mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 00:06:38 +00:00
Fix issue in watchdog - not reading false config overrides.
This commit is contained in:
@ -18,7 +18,7 @@ func parseBoolValue(val string) bool {
|
||||
if val == "true" {
|
||||
return true
|
||||
}
|
||||
return true
|
||||
return false
|
||||
}
|
||||
|
||||
func parseIntValue(val string) int {
|
||||
@ -55,11 +55,15 @@ func (ReadConfig) Read(hasEnv HasEnv) WatchdogConfig {
|
||||
cfg.readTimeout = time.Duration(readTimeout) * time.Second
|
||||
cfg.writeTimeout = time.Duration(writeTimeout) * time.Second
|
||||
|
||||
cfg.writeDebug = parseBoolValue(hasEnv.Getenv("write_debug"))
|
||||
if len(hasEnv.Getenv("write_debug")) > 0 {
|
||||
cfg.writeDebug = parseBoolValue(hasEnv.Getenv("write_debug"))
|
||||
}
|
||||
|
||||
cfg.marshalRequest = parseBoolValue(hasEnv.Getenv("marshal_request"))
|
||||
cfg.debugHeaders = parseBoolValue(hasEnv.Getenv("debug_headers"))
|
||||
|
||||
cfg.suppressLock = parseBoolValue(hasEnv.Getenv("suppress_lock"))
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user