From b26ddba432f8bde78022d2fc8837f0ffb25448b1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 15 Jan 2025 22:12:21 +0100 Subject: fix(dev): fix CSP not working in dev mode behind reverse proxy --- internal/server/mux.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/server/mux.go b/internal/server/mux.go index 83fde10..16f9226 100644 --- a/internal/server/mux.go +++ b/internal/server/mux.go @@ -40,6 +40,7 @@ func applyDevModeOverrides(cfg *config.Config) { } cfg.Web.ContentSecurityPolicy.ScriptSrc = append( cfg.Web.ContentSecurityPolicy.ScriptSrc, + cfg.Web.BaseURL.JoinPath("_templ/reload/script.js").String(), "http://localhost:7331", "'unsafe-inline'", ) -- cgit 1.4.1