helmet-csp
JSON →Content Security Policy middleware for Express and Node.js. Version 4.0.0 requires Node >=18 and ships TypeScript definitions. It sets the Content-Security-Policy header using a directives object with support for camelCase or kebab-case keys, dynamic values via functions, and a default policy that can be overridden or disabled. Unlike generic CSP libraries, it integrates directly with the Helmet ecosystem and provides sensible defaults to prevent common vulnerabilities like XSS, though it performs minimal validation on the policy itself.
Traffic · last 30 days stale · no recent hits
total hits 8
actors 3 distinct systems
last hit 20d ago AhrefsBot
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇬🇧 United Kingdom
Resources
homepagehelmetjs.github.io ↗
API endpoints
full doc /v1/registry/helmet-csp
install /v1/registry/helmet-csp/install
compatibility /v1/registry/helmet-csp/compatibility