refactor: remove sensitive info logging even in debug mode

This commit is contained in:
Stavros
2025-01-28 17:36:06 +02:00
parent c54267f50d
commit 3efcb26db1
13 changed files with 58 additions and 58 deletions

View File

@@ -19,9 +19,9 @@ type User struct {
type Users []User
type Config struct {
Port int `mapstructure:"port"`
Address string `validate:"ip4_addr" mapstructure:"address"`
Secret string `validate:"len=32" mapstructure:"secret"`
Port int `mapstructure:"port" validate:"required"`
Address string `validate:"required,ip4_addr" mapstructure:"address"`
Secret string `validate:"required,len=32" mapstructure:"secret"`
SecretFile string `mapstructure:"secret-file"`
AppURL string `validate:"required,url" mapstructure:"app-url"`
Users string `mapstructure:"users"`
@@ -43,7 +43,7 @@ type Config struct {
DisableContinue bool `mapstructure:"disable-continue"`
OAuthWhitelist string `mapstructure:"oauth-whitelist"`
CookieExpiry int `mapstructure:"cookie-expiry"`
LogLevel int8 `mapstructure:"log-level"`
LogLevel int8 `mapstructure:"log-level" validate:"min=-1,max=5"`
}
type UserContext struct {