csp-report-lite
TypeScript icon, indicating that this package has built-in type declarations

2.0.1 • Public • Published

csp-report-lite

A lightweight sink (target) for Content Security Policy report-uri reporting that does initial filtering to hopefully report only as much as a human could reasonably read.

Surface:

  1. a docker container with an entire server accepting input and logging json to stdout, errors to stderr
  2. a request handler for a node server
  3. a report aggregator function for doing the logic

More docs coming soon. Typings are available to explain more details

Usage

See usage example in server.js file

API

Docs generated using docts

Interface AggrOptions

Aggregator options
Source code: <>

Properties:

.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation string

Interface HandlerOptions

Handler options
Source code: <>

Properties:

.beforeReport (req: any) => any
.maxBytes number
.logger (...params: any[]) => any
.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation string

Function reportAggregator

Source code: <>

reportAggregator( ) AcceptReport <>
 ▪ options AggrOptions

Function requestHandler

Request handler compatible with Node's http .reateServer
Source code: <>

requestHandler( ) RequestListener <>
 ▪ options HandlerOptions

Readme

Keywords

none

Package Sidebar

Install

npm i csp-report-lite

Weekly Downloads

0

Version

2.0.1

License

Apache-2.0

Unpacked Size

20.3 kB

Total Files

7

Last publish

Collaborators

  • naugtur