Stack of changes to get gin, scs, nosurf running.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user