1.0.1 • Published 5 years ago
local-csp-reporter v1.0.1
local-csp-reporter
A simple localhost server to log CSP violations
Useful for testing and debugging Content Security Policies
Install
$ npm install -g local-csp-reporter
Usage
After installation, you have a command you can run from the terminal to start the server:
$ local-csp-reporter
Now you can use http://localhost:3003/report-violation
as your report-uri and report-to directives in your Content Security Policy.
:rainbow:
Port Assignment
If you want to change the default port number, use the PORT
enviornment variable:
$ PORT=8001 local-csp-reporter