content-security-policy

JSON →
library 0.3.4 ·javascript maintenance
verified May 27, 2026

Express/Connect middleware for setting Content-Security-Policy HTTP headers according to the W3C CSP specification (v0.3.4). This library provides helper constants (SRC_NONE, SRC_SELF, SRC_DATA) and a convenient getCSP() function to generate middleware for global or route-specific policies. It is minimal and focused solely on CSP headers, unlike more comprehensive security packages such as helmet (which includes CSP as one of many middleware). The package requires Node >= 0.4.0 and has no external dependencies, making it lightweight and easy to integrate into existing Express applications. The API is stable but the package has not seen updates since 2018; consider evaluating its suitability for modern CSP requirements.

total hits 37
actors 8 distinct systems
last hit 1d ago AhrefsBot
ByteDance
10
Amazonbot
4
MetaBot
4
GPTBot
2
Script
1
Search engines
1
Humans
7

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇩🇪 Germany · 🇨🇦 Canada · VN