diff options
author | Alan Pearce | 2025-01-15 22:12:21 +0100 |
---|---|---|
committer | Alan Pearce | 2025-01-15 22:12:21 +0100 |
commit | b26ddba432f8bde78022d2fc8837f0ffb25448b1 (patch) | |
tree | b1261d1132d2c9f9f97e138c37dff7839e5435f8 | |
parent | 88b3b8158207e8f3ef6be4bc6d44cd450464eecc (diff) | |
download | searchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.tar.lz searchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.tar.zst searchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.zip |
fix(dev): fix CSP not working in dev mode behind reverse proxy
-rw-r--r-- | internal/server/mux.go | 1 |
1 files changed, 1 insertions, 0 deletions
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'", ) |