nails / module-csp
Build and send a Content-Security-Policy header from Nails applications
dev-develop
2026-10-31 09:58 UTC
Requires
- php: >=8.3
- nails/common: dev-develop
Requires (Dev)
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-31 10:01:59 UTC
README
Build a Content-Security-Policy in code and send it as a header from Nails applications.
Load a policy into the Csp service during the request; the module compiles it and sets the Content-Security-Policy header just before output. Policies can carry a per-request nonce for scripts and styles.
See the documentation for the policy API and nonce handling.