rumkin / plant

🌳 JS web server charged with WebAPI and neat HTTP2 support
https://npmjs.com/package/@plant/plant
81 stars 6 forks source link

Add CSP handler #8

Open rumkin opened 5 years ago

rumkin commented 5 years ago

Create @plant/csp package to manage Content-Security Policies.

Handler should add csp context entry which allow to manage CSP policies as data. After request handling is finished, convert CSP into string and set Content-Security-Policy header.

Example: Helmet CSP