{"id":22202655,"url":"https://github.com/cherry/network-error-logging","last_synced_at":"2025-07-27T05:31:40.521Z","repository":{"id":38355459,"uuid":"158014492","full_name":"Cherry/network-error-logging","owner":"Cherry","description":"Middleware for setting the NEL HTTP response header","archived":false,"fork":false,"pushed_at":"2024-11-25T13:01:51.000Z","size":1371,"stargazers_count":5,"open_issues_count":3,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-27T03:34:22.376Z","etag":null,"topics":["express","hacktoberfest","middleware","nel","network-error-logging"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cherry.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"https://www.paypal.me/jamesross134"}},"created_at":"2018-11-17T18:47:51.000Z","updated_at":"2024-09-29T13:48:34.000Z","dependencies_parsed_at":"2023-02-13T19:31:43.467Z","dependency_job_id":"f5cde21c-1395-4bcc-9714-8209aecd84ce","html_url":"https://github.com/Cherry/network-error-logging","commit_stats":{"total_commits":177,"total_committers":5,"mean_commits":35.4,"dds":"0.35593220338983056","last_synced_commit":"95e9d129ccf74edc674b3f4db064ad5a75c6a4be"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherry%2Fnetwork-error-logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherry%2Fnetwork-error-logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherry%2Fnetwork-error-logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cherry%2Fnetwork-error-logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cherry","download_url":"https://codeload.github.com/Cherry/network-error-logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227762839,"owners_count":17816091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["express","hacktoberfest","middleware","nel","network-error-logging"],"created_at":"2024-12-02T16:35:43.250Z","updated_at":"2024-12-02T16:35:43.955Z","avatar_url":"https://github.com/Cherry.png","language":"JavaScript","funding_links":["https://www.paypal.me/jamesross134"],"categories":[],"sub_categories":[],"readme":"Network Error Logging\n==============\n[![npm version](https://badge.fury.io/js/network-error-logging.svg)](https://badge.fury.io/js/network-error-logging)\n[![dependencies Status](https://david-dm.org/Cherry/network-error-logging/status.svg)](https://david-dm.org/Cherry/network-error-logging)\n[![Actions Status](https://github.com/Cherry/network-error-logging/workflows/Test/badge.svg)](https://github.com/Cherry/network-error-logging/actions)\n[![Coverage Status](https://coveralls.io/repos/github/Cherry/network-error-logging/badge.svg?branch=main)](https://coveralls.io/github/Cherry/network-error-logging?branch=main)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FCherry%2Fnetwork-error-logging.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2FCherry%2Fnetwork-error-logging?ref=badge_shield)\n\nThis is Express middleware to set the `NEL` HTTP response header. You can read more about it [here](https://www.w3.org/TR/network-error-logging/#nel-response-header).\n\nTo use:\n\n```javascript\nconst NEL = require('network-error-logging')\n\n// ...\n\napp.use(NEL({\n  report_to: 'endpoint-1', // REQUIRED to register. OPTIONAL if intention is to remove a previous registration. defined in the Report-To header\n  max_age: 31_536_000, // REQUIRED. seconds\n  include_subdomains: true, // OPTIONAL\n  success_fraction: 0.5, // OPTIONAL. sampling rate\n  failure_fraction: 0.5, // OPTIONAL. sampling rate\n  request_headers: [\"If-None-Match\"], // OPTIONAL. request headers whose names and values are included in the network error reports\n  response_headers: [\"ETag\"] // OPTIONAL. response headers whose names and values are included in the network error reports\n}))\n```\nFor further documentation on each field, see https://w3c.github.io/network-error-logging/#nel-response-header.\n\nThis header is best set with a previously defined `Report-To` group. [This module](https://github.com/Cherry/report-to) is a great way to do that.\n\nhttps://report-uri.com/ is a great reporting platform for monitoring CSP, NEL, etc. error logs.\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2FCherry%2Fnetwork-error-logging.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2FCherry%2Fnetwork-error-logging?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcherry%2Fnetwork-error-logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcherry%2Fnetwork-error-logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcherry%2Fnetwork-error-logging/lists"}