diff options
| author | lost+skunk <[email protected]> | 2024-08-13 15:59:52 +0300 |
|---|---|---|
| committer | lost+skunk <[email protected]> | 2024-08-13 15:59:52 +0300 |
| commit | 1537da9b16dfda1ecb2730b5d1de3b9005397618 (patch) | |
| tree | 0cce5db0cb6393d369b7f8207d495645510276f2 /app/config.go | |
| parent | 4db018fb7f01669cb5e4c1da4b56ccfe3dbadd6f (diff) | |
| download | skunky-art-1537da9b16dfda1ecb2730b5d1de3b9005397618.tar.gz skunky-art-1537da9b16dfda1ecb2730b5d1de3b9005397618.tar.bz2 skunky-art-1537da9b16dfda1ecb2730b5d1de3b9005397618.zip | |
темплейты в бинарнике и улучшенная система кеша
Diffstat (limited to 'app/config.go')
| -rw-r--r-- | app/config.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/app/config.go b/app/config.go index a6ac756..7d159e7 100644 --- a/app/config.go +++ b/app/config.go @@ -4,6 +4,7 @@ import ( "encoding/json" "os" "regexp" + "skunkyart/static" "strconv" "time" @@ -24,9 +25,9 @@ type config struct { URI string `json:"uri"` Cache cache_config Proxy, Nsfw bool - UserAgent string `json:"user-agent"` - DownloadProxy string `json:"download-proxy"` - Dirs []string `json:"dirs-to-memory"` + UserAgent string `json:"user-agent"` + DownloadProxy string `json:"download-proxy"` + StaticPath string `json:"static-path"` } var CFG = config{ @@ -38,10 +39,10 @@ var CFG = config{ Path: "cache", UpdateInterval: 1, }, - Dirs: []string{"html", "css", "misc"}, - UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36", - Proxy: true, - Nsfw: true, + StaticPath: "static", + UserAgent: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36", + Proxy: true, + Nsfw: true, } var lifetimeParsed int64 @@ -56,6 +57,7 @@ func ExecuteConfig() { 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 |
