csp-endpoint

0.0.1 • Public • Published

csp-endpoint

Endpoint for collecting CSP violation reports.

Usage

$ csp-endpoint --port 3000 --path '/'
Listening on http://host:3000/
{"csp-report":{"document-uri":"https://catfactspammer.com/","referrer":"",...}
{"csp-report":{"document-uri":"https://catfactspammer.com/","referrer":"",...}
{"csp-report":{"document-uri":"https://catfactspammer.com/","referrer":"",...}

Options:

➜  csp-endpoint git:(master) ✗ csp-endpoint --help

Usage: node csp-endpoint.js [options]

Options:
   --path   The path of the endpoint to collect reports on  [/]
   --port   The port of the endpoint to collect reports on  [3000]

Documentation can be found at Https://github.com/c0nrad/csp-endpoint

Installation

npm install -g csp-endpoint

Express middleware

Express doesn't parse applicaiton/csp-report, so to help express use this middleware:

var csp = require('csp-endpoint');
var express = require('express');
var app = express();
app.use(csp.parser);
...

Future

  • classification

Contact

Stuart Larsen c0nrad.io c0nrad@c0nrad.io

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.1
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.1
    2
  • 0.0.0
    1

Package Sidebar

Install

npm i csp-endpoint

Weekly Downloads

3

Version

0.0.1

License

ISC

Last publish

Collaborators

  • c0nrad