Generate a production-ready Content Security Policy for your Laravel app. Nonce-based, Vite-ready, Livewire-aware. Laravel CSP setup has too many silent failure modes—miss `Vite::useCspNonce()` and your JS bundle quietly breaks. Laravel CSP Generator handles it visually. Toggle CDNs, integrations (GA4, GTM, Livewire, Tawk.to), and environments. Get: • Full CSP header • Ready-to-paste PHP middleware • Live 12-step checklist • Directive reference 100% client-side. No signup. No data sent.
Hey PH! 👋
Built this after a pentest flagged that our Laravel app had no CSP at all — XSS payloads executing freely.
The implementation is trickier than the docs suggest, so I built a tool that handles the config and generates production-ready PHP code.
The companion blog post goes deep on the implementation if you want to understand the why behind each directive: https://blog.shakiltech.com/lara...
Happy to answer any questions about CSP, Laravel security, or the tool itself.
Report
No reviews yetBe the first to leave a review for CSP Generator by Shakil