CSP Header Generator
Assemble a Content-Security-Policy from sensible defaults, with a strict preset and a report-only mode.
Result
- Directives
- —
- Size
- —
How it works
- Directives left blank are omitted, and
default-srcis always emitted first so the policy is valid. - A strict preset locks everything to
'self'; a permissive preset allows common CDNs so you can tighten it from there. - Use report-only mode to test a policy in production without blocking anything.