You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(csp): inject per-page Content-Security-Policy meta tag
Tight CSP with no 'unsafe-inline'. Each inline <script> body is
sha256-hashed and allowlisted individually, so we avoid blanket
permissiveness while still supporting:
- meander's hljs bootstrap (<script>marked.setOptions...</script>)
- our SW register block
- the __defIndex + socketWalkthrough config blocks
Directives:
script-src self + unpkg + per-inline hashes
style-src self + unpkg (no inline styles)
img-src self + data: (CSS validity icons use data URIs)
connect-src self + val backend (when configured)
worker-src self
base-uri self
form-action self
frame-ancestors none (clickjacking protection)
default-src self (catchall)
Runs in the post-minify SRI pass — same file-walking structure,
same per-file writeback. Per-page because __defIndex varies per part,
so the inline-script hash set differs per HTML file.
0 commit comments