about summary refs log tree commit diff stats
path: root/internal
diff options
context:
space:
mode:
authorAlan Pearce2025-01-15 22:12:21 +0100
committerAlan Pearce2025-01-15 22:12:21 +0100
commitb26ddba432f8bde78022d2fc8837f0ffb25448b1 (patch)
treeb1261d1132d2c9f9f97e138c37dff7839e5435f8 /internal
parent88b3b8158207e8f3ef6be4bc6d44cd450464eecc (diff)
downloadsearchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.tar.lz
searchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.tar.zst
searchix-b26ddba432f8bde78022d2fc8837f0ffb25448b1.zip
fix(dev): fix CSP not working in dev mode behind reverse proxy
Diffstat (limited to 'internal')
-rw-r--r--internal/server/mux.go1
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'",
 	)