diff options
author | Alan Pearce | 2024-12-31 14:56:37 +0100 |
---|---|---|
committer | Alan Pearce | 2025-01-02 15:05:56 +0100 |
commit | 58643f38bdd62dc538a03865b1f81eb77d957779 (patch) | |
tree | bf2c5ccce1592ae8bc30508be38510f15fe31b5e /internal/config/config.go | |
parent | 1872c47e393e9c4c811f3b90ec2e0ac4cd8767b2 (diff) | |
download | searchix-58643f38bdd62dc538a03865b1f81eb77d957779.tar.lz searchix-58643f38bdd62dc538a03865b1f81eb77d957779.tar.zst searchix-58643f38bdd62dc538a03865b1f81eb77d957779.zip |
feat: show scores in results table in dev mode
Diffstat (limited to 'internal/config/config.go')
-rw-r--r-- | internal/config/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index b5f2ee4..33ce1da 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -12,6 +12,7 @@ import ( ) var Version string +var DevMode bool type URL struct { *url.URL @@ -127,6 +128,8 @@ func GetConfig(filename string, log *log.Logger) (*Config, error) { } } + DevMode = config.Web.Environment == "development" + config.Web.ContentSecurityPolicy.ScriptSrc = append( config.Web.ContentSecurityPolicy.ScriptSrc, config.Web.BaseURL.JoinPath("/static/").String(), |