content-security-policy
Middleware to add Content-Security-Policy header according to http://www.w3.org/TR/CSP/
Install
$ npm install content-security-policy --save
Tests
$ npm install --dev
$ npm test
Usage
const csp = ;const express = ;const app = ; const cspPolicy = 'report-uri': '/reporting' 'default-src': cspSRC_NONE 'script-src': cspSRC_SELF cspSRC_DATA ; const globalCSP = csp;const localCSP = csp; // This will apply this policy to all requests if no local policy is setapp; app; // This will apply the local policy just to this path, overriding the globla policyapp; app;