Further config updates, also upgrading dependent packages
This commit is contained in:
@@ -17,17 +17,29 @@ type DbConfig struct {
|
||||
Name string `toml:"name"`
|
||||
}
|
||||
|
||||
type StackConfiguration struct {
|
||||
ConfigLoaded bool
|
||||
type ServerConfig struct {
|
||||
Port string `toml:"port"`
|
||||
}
|
||||
|
||||
type RateLimitConfig struct {
|
||||
AuthedLimits string `toml:"authed"`
|
||||
UnauthedLimits string `toml:"unauthed"`
|
||||
}
|
||||
|
||||
type SecurityConfig struct {
|
||||
AllowFreshAdminGeneration bool `toml:"gen-fresh-admin"`
|
||||
AdminEmails []string `toml:"admin-emails"`
|
||||
AdminHmacEnv string `toml:"admin-hmac-env"`
|
||||
UserHmacEnv string `toml:"user-hmac-env"`
|
||||
AuthedRateLimitConfig string `toml:"auth-rate-limit-defs"`
|
||||
UnauthedRateLimitConfig string `toml:"unauth-rate-limit-defs"`
|
||||
}
|
||||
|
||||
Db DbConfig `toml:"db"`
|
||||
type StackConfiguration struct {
|
||||
ConfigLoaded bool
|
||||
|
||||
Server ServerConfig `toml:"server"`
|
||||
Db DbConfig `toml:"db"`
|
||||
RateLimits RateLimitConfig `toml:"rate-limits"`
|
||||
Security SecurityConfig `toml:"security"`
|
||||
}
|
||||
|
||||
var Environment = os.Getenv("STACK_ENVIRONMENT")
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
gen-fresh-admin = true
|
||||
admin-emails = ["admin@admin.invalid"]
|
||||
admin-hmac-env = "ADMIN_HMAC_ENV"
|
||||
user-hmac-env = "USER_HMAC_ENV"
|
||||
auth-rate-limit-defs = "ratelimit.auth.toml"
|
||||
unauth-rate-limit-defs = "ratelimit.unauth.toml"
|
||||
[server]
|
||||
port = "9091"
|
||||
|
||||
[db]
|
||||
dialect = "sqlite"
|
||||
@@ -11,4 +7,14 @@ url = "prepack.db"
|
||||
username = ""
|
||||
password-secret = ""
|
||||
port = ""
|
||||
name = ""
|
||||
name = ""
|
||||
|
||||
[rate-limits]
|
||||
authed = "ratelimit.auth.toml"
|
||||
unauthed = "ratelimit.unauth.toml"
|
||||
|
||||
[security]
|
||||
gen-fresh-admin = true
|
||||
admin-emails = ["admin@admin.invalid"]
|
||||
admin-hmac-env = "ADMIN_HMAC_ENV"
|
||||
user-hmac-env = "USER_HMAC_ENV"
|
||||
|
||||
Reference in New Issue
Block a user