enforce 16 characters for companion.secret_key
All checks were successful
CI / build (push) Successful in 59s
All checks were successful
CI / build (push) Successful in 59s
ref: 23ff6135bb
This commit is contained in:
parent
e13b2e02a7
commit
356e523bc8
1 changed files with 7 additions and 0 deletions
|
@ -92,4 +92,11 @@ func LoadConfig() {
|
|||
Secret_key: getEnvString("SECRET_KEY", "", false),
|
||||
},
|
||||
}
|
||||
checkConfig()
|
||||
}
|
||||
|
||||
func checkConfig() {
|
||||
if len(Cfg.Companion.Secret_key) > 16 {
|
||||
log.Fatalln("The value of 'companion.secret_key' (YTPROXY_SECRET_KEY) needs to be a size of 16 characters.")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue