csp-report-lite v2.0.1
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
AggrOptionsAggregator options
Source code:<>Properties:
.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation stringInterface
HandlerOptionsHandler options
Source code:<>Properties:
.beforeReport (req: any) => any
.maxBytes number
.logger (...params: any[]) => any
.target TargetCallback
.cacheLimit number
.cacheTTL number
.exponentialAggregation stringFunction
reportAggregatorSource code:
<>reportAggregator( ) ⇒ AcceptReport
<>
▪ options AggrOptionsFunction
requestHandlerRequest handler compatible with Node's http .reateServer
Source code:<>requestHandler( ) ⇒ RequestListener
<>
▪ options HandlerOptions