CSP and security headers generator builds editable source directives and server snippets, with conservative policy warnings.
Include frame protection, referrer and permissions policies. HSTS is optional; the supplied-text audit cannot establish that a live site is secure.
How to use
- Set source directives for the resources your application actually uses.
- Choose report-only, related headers and the target server format.
- Generate, review warnings and test reports before enabling enforcement.
Frequently asked questions
Does report-only block attacks?
No. It reports policy violations without blocking resources. Configure reporting separately and review violations before enforcing.
Is this a complete CSP audit?
No. It checks a documented directive subset and common text patterns, not live responses, nonce generation or application behavior.
Should I enable HSTS for every subdomain?
Only after every affected host is ready for HTTPS. This setting can make insecure hosts unreachable; preload is deliberately omitted.
Can I paste a policy into a meta tag?
Not every directive works in meta tags. Use response headers for frame-ancestors and report-only behavior.
Editable source lists
Start from self-hosted sources and add actual dependencies. Wildcards, unsafe-inline and unsafe-eval produce warnings; duplicates and mixed none sources need review.
Several layers
CSP complements authentication and output encoding. X-Frame-Options, nosniff, referrer and permissions policies serve different purposes; none proves security on its own.
