From 58643f38bdd62dc538a03865b1f81eb77d957779 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 31 Dec 2024 14:56:37 +0100 Subject: feat: show scores in results table in dev mode --- internal/config/config.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/config/config.go') 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(), -- cgit 1.4.1