better default env values
This commit is contained in:
parent
f93d7f2e7a
commit
e4810bf1be
@ -54,9 +54,17 @@ func LoadEnv() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func setDefaultEnvs() {
|
func setDefaultEnvs() {
|
||||||
|
if _, ok := os.LookupEnv(Prefix + "UploadDir"); !ok {
|
||||||
os.Setenv(Prefix+"UploadDir", "uploads/")
|
os.Setenv(Prefix+"UploadDir", "uploads/")
|
||||||
|
}
|
||||||
|
if _, ok := os.LookupEnv(Prefix + "LOG_FILE"); !ok {
|
||||||
os.Setenv(Prefix+"LOG_FILE", "auth_failures.log")
|
os.Setenv(Prefix+"LOG_FILE", "auth_failures.log")
|
||||||
|
}
|
||||||
|
|
||||||
|
if _, ok := os.LookupEnv(Prefix + "MaxFailedAttempts"); !ok {
|
||||||
os.Setenv(Prefix+"MaxFailedAttempts", "3")
|
os.Setenv(Prefix+"MaxFailedAttempts", "3")
|
||||||
|
}
|
||||||
|
if _, ok := os.LookupEnv(Prefix + "BanDuration"); !ok {
|
||||||
os.Setenv(Prefix+"BanDuration", "5")
|
os.Setenv(Prefix+"BanDuration", "5")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user