Bootstrapped the creation and loading of session keys to lighten main.
This commit is contained in:
5
main.go
5
main.go
@@ -27,6 +27,11 @@ func main() {
|
||||
db := storage.InitDB("synlotto.db")
|
||||
models.SetDB(db) // Should be in storage not models.
|
||||
|
||||
err = bootstrap.InitSession(appState.Config)
|
||||
if err != nil {
|
||||
logging.Error("❌ Failed to init session: %v", err)
|
||||
}
|
||||
|
||||
err = securityhandlers.InitCSRFProtection([]byte(appState.Config.CSRF.CSRFKey), appState.Config.HttpServer.ProductionMode)
|
||||
if err != nil {
|
||||
logging.Error("Failed to init CSRF: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user