From 2840e10d37fe0157f7b2984a32370a797a2899d4 Mon Sep 17 00:00:00 2001 From: odrling Date: Wed, 17 Jul 2024 11:54:29 +0200 Subject: [PATCH] parse SECURE=false as false bool --- server/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/config.go b/server/config.go index 5fbb892..8275380 100644 --- a/server/config.go +++ b/server/config.go @@ -76,7 +76,8 @@ func setConfigValue(config_value reflect.Value, config_type reflect.Type, prefix } field.SetInt(int64(int_value)) case reflect.Bool: - field.SetBool(getFieldValue(field_type, prefix) != "") + value := getFieldValue(field_type, prefix) + field.SetBool(value != "" && value != "false" && value != "0") case reflect.Struct: field_prefix := prefix + field_type.Tag.Get("env_prefix") + "_" setConfigValue(field, field_type.Type, field_prefix)