feat: add Content-Security-Policy header for embedded web SPA #65
Reference in New Issue
Block a user
Delete Branch "feat/add-csp-headers"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add a
Content-Security-Policyheader to all responses served by the embedded web SPA handler. The policy restricts scripts, styles, and all other resource types to same-origin only (default-src 'self'; script-src 'self'; style-src 'self'), matching the SPA's actual behavior:fetch()API calls (no WebSockets)style-src)This provides defense-in-depth against XSS, complementing Preact's built-in output escaping.
closes #41
Closing as duplicate — PR #64 already addresses issue #41 with the same CSP header implementation.
Pull request closed