csp-generator
Content Security Policy Generator
Install
Install with npm
$ npm install csp-generator
Or install with yarn
$ yarn add csp-generator
;
Or umd builds are also available
Will expose the global variable to window.CSP
.
Usage
const csp = "script-src 'self' 'unsafe-inline'"; // Get a policycsp; // Add new policycsp; // If there is already a policy, add a new value to the existing policycsp; // Delete a policycsp; // Delete a value in a policycsp; // Get a new cspcsp;
License
MIT © Harvey Zack