From 191984b31ef228c4077904a2831a2af593352670 Mon Sep 17 00:00:00 2001 From: lost+skunk Date: Mon, 23 Sep 2024 09:38:32 +0300 Subject: v1.3.2 --- app/config.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'app/config.go') diff --git a/app/config.go b/app/config.go index 745d2f4..2ba39a9 100644 --- a/app/config.go +++ b/app/config.go @@ -56,13 +56,11 @@ func ExecuteConfig() { if CFG.cfg != "" { f, err := os.ReadFile(CFG.cfg) tryWithExitStatus(err, 1) - tryWithExitStatus(json.Unmarshal(f, &CFG), 1) if CFG.Cache.Enabled && !CFG.Proxy { exit("Incompatible settings detected: cannot use caching media content without proxy", 1) } - static.StaticPath = CFG.StaticPath if CFG.Cache.Enabled { if CFG.Cache.Lifetime != "" { var duration int64 @@ -92,6 +90,13 @@ func ExecuteConfig() { CFG.Cache.MaxSize *= 1024 ^ 2 go InitCacheSystem() } + + About = instanceAbout{ + Proxy: CFG.Proxy, + Nsfw: CFG.Nsfw, + } + + static.StaticPath = CFG.StaticPath devianter.UserAgent = CFG.UserAgent } } -- cgit v1.2.3