radiovisual / local-csp-reporter

A simple localhost server to log CSP violations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

local-csp-reporter Build Status Coverage Status

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.

🌈

Port Assignment

If you want to change the default port number, use the PORT enviornment variable:

$ PORT=8001 local-csp-reporter                

License

MIT ©

About

A simple localhost server to log CSP violations

License:MIT License


Languages

Language:JavaScript 100.0%