- web.SecurityHeaders middleware wired into the chi router
- Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' (page scripts are inline); frame-ancestors 'none'
- Referrer-Policy: no-referrer, X-Content-Type-Options: nosniff
- Applied only to text/html responses; JSON API and /raw pass through unchanged
- Regression test internal/web/securityheaders_test.go
poslop
merged commit 44fe3c5772 into main2026-09-09 14:26:01 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds
web.SecurityHeadersmiddleware (issue #59):default-src 'self'; script-src 'self' 'unsafe-inline'; frame-ancestors 'none'(page scripts are inline)Applied to all rendered HTML responses (page templates + inline can page);
/apiand/rawpass through unchanged. Closes #59.