Allow using 1 or true for all boolean config options (#242)

Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/242
Reviewed-by: orangix <orangix@noreply.codeberg.org>
Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
This commit is contained in:
video-prize-ranch
2026-01-12 01:52:26 +01:00
committed by video-prize-ranch
parent 3b8ad3f360
commit eabb7d9917

View File

@@ -51,8 +51,8 @@ func LoadConfig() {
Addr: addr,
ImgurId: imgurId,
ProtocolDetection: os.Getenv("PROTOCOL_DETECTION") == "true" || os.Getenv("PROTOCOL_DETECTION") == "1",
Secure: os.Getenv("SECURE") == "true",
FiberPrefork: os.Getenv("FIBER_PREFORK") == "true",
Secure: os.Getenv("SECURE") == "true" || os.Getenv("SECURE") == "1",
FiberPrefork: os.Getenv("FIBER_PREFORK") == "true" || os.Getenv("FIBER_PREFORK") == "1",
ForceWebp: os.Getenv("FORCE_WEBP") == "true" || os.Getenv("FORCE_WEBP") == "1",
Privacy: map[string]interface{}{
"set": os.Getenv("PRIVACY_NOT_COLLECTED") != "",