Stack of changes to get gin, scs, nosurf running.

This commit is contained in:
2025-10-28 11:56:42 +00:00
parent 07117ba35e
commit 86be6479f1
65 changed files with 1890 additions and 1503 deletions

View File

@@ -2,21 +2,19 @@ package config
import (
"sync"
"synlotto-website/internal/platform/config"
)
var (
appConfig *config.Config
appConfig *Config
once sync.Once
)
func Init(config *config.Config) {
func Init(config *Config) {
once.Do(func() {
appConfig = config
})
}
func Get() *config.Config {
func Get() *Config {
return appConfig
}

View File

@@ -28,8 +28,11 @@ type Config struct {
} `json:"license"`
Session struct {
Name string `json:"name"`
Lifetime string `json:"lifetime"`
CookieName string `json:"cookieName"`
Lifetime string `json:"lifetime"`
IdleTimeout string `json:"idleTimeout"`
RememberCookieName string `json:"rememberCookieName"`
RememberDuration string `json:"rememberDuration"`
} `json:"session"`
Site struct {