Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
wille committed Jul 30, 2024
1 parent 1bff1c5 commit 63ff2ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Supports "CSP Level 2 Reports" in browsers browsers not supporting the Reporting
Retrofitting a policy on a large website is hard to get right first. The solution is to use `-Report-Only` policies that will not enforce them and break your website. These headers and their enforcing equivalents supports reporting, which makes all policy violations gets sent to you so you can adjust your policies to not break functionality.

### Setup a reporting endpoint and setup reporters on your policy headers

```
$ npm install reporting-api
```

```ts
import { reportingEndpoint } from 'reporting-api';
import express from 'express';
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
"files": [
"dist/"
],
"repository": "github:wille/reporting-api",
"repository": {
"type": "git",
"url": "git+https://github.com/wille/reporting-api.git"
},
"author": "wille",
"license": "MIT",
"description": "Roll your own Reporting API collector. Supports CSP, COEP, COOP, Document-Policy, Crash reports, Deprecation reports, Intervention reports and Network Error Logging ",
Expand Down

0 comments on commit 63ff2ad

Please sign in to comment.