csp-report-lite
v2.0.1
Published
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.
Downloads
3
Readme
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:
- a docker container with an entire server accepting input and logging json to stdout, errors to stderr
- a request handler for a node server
- 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 stringInterface
HandlerOptions
Handler options
Source code:<>
Properties:
.beforeReport (req: any) => any
.maxBytes number
.logger (...params: any[]) => any
.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation stringFunction
reportAggregator
Source code:
<>
reportAggregator( ) ⇒ AcceptReport
<>
▪ options AggrOptionsFunction
requestHandler
Request handler compatible with Node's http .reateServer
Source code:<>
requestHandler( ) ⇒ RequestListener
<>
▪ options HandlerOptions