使用方法
- Review the directives table and type or paste sources into each directive row (script-src, style-src, img-src, etc.)。
- Click the source chips beneath each row (such as 'self', unsafe-inline, data:) to append common tokens quickly。
- Toggle between Minified and Pretty output views to suit your use case。
- Copy the generated Content-Security-Policy header value and paste it into your server configuration or meta tag。
範例
- Adding 'self' and https://cdn.example.com to script-src produces script-src 'self' https://cdn.example.com in the header output。
- Leaving all directives empty and adding only default-src 'none' produces a strict deny-all baseline policy。