csp-reporter

CSP reporter

Usage no npm install needed!

<script type="module">
  import cspReporter from 'https://cdn.skypack.dev/csp-reporter';
</script>

README

CSP Reporter

This repository basically creates an HTTP server to collect CSP violations.

What is CSP

Deploy to Heroku

If you deploy to the heroku, you need to add log collector addon like as Logentries because by default Heroku masks the stdout in the application logs.

Installation

Reporter does not have dependency. Bare HTTP and not included JSON parsing at all. (Which you don't have to do.)

git clone https://github.com/cagataycali/csp-reporter.git
cd csp-reporter
node index.js # Starts a server at http://localhost:8000

Test

node test.js # Starts a server at http://localhost:3000