This commit is contained in:
@@ -13,6 +13,7 @@ type Config struct {
|
||||
SessionTTL time.Duration
|
||||
MaxUploadSize int64
|
||||
CookieSecure bool
|
||||
AppCSPEnabled bool
|
||||
LogLevel string
|
||||
GitAllowedHosts []string
|
||||
}
|
||||
@@ -23,6 +24,7 @@ func Load() Config {
|
||||
SessionTTL: durationEnvOrDefault("SESSION_TTL", 30*time.Minute),
|
||||
MaxUploadSize: int64(intEnvOrDefault("MAX_UPLOAD_SIZE", 5*1024*1024)),
|
||||
CookieSecure: boolEnvOrDefault("COOKIE_SECURE", true),
|
||||
AppCSPEnabled: boolEnvOrDefault("APP_CSP_ENABLED", true),
|
||||
LogLevel: envOrDefault("LOG_LEVEL", "info"),
|
||||
GitAllowedHosts: csvEnvOrDefault("GIT_ALLOWED_HOSTS", []string{
|
||||
"github.com",
|
||||
|
||||
Reference in New Issue
Block a user