Skip to content

Commit

Permalink
Merge pull request #32 from Hongbo-Miao/patch-2
Browse files Browse the repository at this point in the history
docs(readme): make easier to read
  • Loading branch information
Cherry committed Oct 18, 2020
2 parents ca2efbb + 00fe1ca commit 3b96298
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ const NEL = require('network-error-logging')
// ...

app.use(NEL({
report_to: 'endpoint-1', // REQUIRED to register. OPTIONAL if intention is to remove a previous registration. defined in the Report-To header
max_age: 31536000, // REQUIRED. seconds
include_subdomains: true, // OPTIONAL
success_fraction: 0.5, // OPTIONAL. sampling rate
failure_fraction: 0.5, // OPTIONAL. sampling rate
request_headers: ["If-None-Match"], // OPTIONAL. request headers whose names and values are included in the network error reports
response_headers: ["ETag"] // OPTIONAL. response headers whose names and values are included in the network error reports
report_to: 'endpoint-1', // REQUIRED to register. OPTIONAL if intention is to remove a previous registration. defined in the Report-To header
max_age: 31536000, // REQUIRED. seconds
include_subdomains: true, // OPTIONAL
success_fraction: 0.5, // OPTIONAL. sampling rate
failure_fraction: 0.5, // OPTIONAL. sampling rate
request_headers: ["If-None-Match"], // OPTIONAL. request headers whose names and values are included in the network error reports
response_headers: ["ETag"] // OPTIONAL. response headers whose names and values are included in the network error reports
}))
```
For further documentation on each field, see https://w3c.github.io/network-error-logging/#nel-response-header.
Expand Down

0 comments on commit 3b96298

Please sign in to comment.