Configure your directives, copy the middleware, deploy with confidence. No signup needed.
style-src-attr is always set to 'none' — inline style="" attributes cannot carry a nonce.
Controls fetch(), XHR, WebSockets and SSE. Vite HMR WebSocket is added automatically when local dev is on.
4 pages. Every directive, the checklist, common mistakes, and quick-start snippets — without keeping this tab open.
No spam. Unsubscribe any time. PDF delivered immediately.
Not just a header builder — a complete workflow from configuration to deployment.
Content-Security-Policy-Report-Only with a report-to endpoint first. Browsers log violations but block nothing. Run it in production for 1–2 weeks, review the reports, fix any legitimate sources, then switch to enforcement mode.script-src cdn.example.com. Avoid 'unsafe-inline' or * wildcards — they defeat the purpose. For extra protection, add Subresource Integrity (SRI) hashes to your <script> and <link> tags.Report-Only mode first. The browser reports violations but blocks nothing. Run it for a week, fix your templates, then enforce.Vite::useCspNonce($nonce) is called before $next($request). Second, make sure connect-src includes ws://localhost:5173 in your local environment. Enable Local Dev mode above — it handles both.report-uri is the original, widely supported mechanism. Report-To is the newer Reporting API — reports are batched and the endpoint is cached. Use both for maximum coverage, or use report-uri.com as a hosted alternative.@livewireScripts(['nonce' => $cspNonce]). For Livewire v3: @livewireScriptConfig(['nonce' => $cspNonce]). Enable the Livewire integration above and the checklist will remind you.