{"id":19709983,"url":"https://github.com/aerisweather/winstonjs-transport-http-headers","last_synced_at":"2026-05-09T05:06:29.473Z","repository":{"id":57398179,"uuid":"51176283","full_name":"aerisweather/winstonjs-transport-http-headers","owner":"aerisweather","description":"A WinstonJS transport that logs to HTTP headers, useful for sending profiling data to the browser that doesn't muddle the response body.","archived":false,"fork":false,"pushed_at":"2019-02-05T21:11:32.000Z","size":35,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-22T05:03:12.082Z","etag":null,"topics":["express","logging","nodejs","winston"],"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/aerisweather.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-05T21:49:05.000Z","updated_at":"2023-12-26T16:38:49.000Z","dependencies_parsed_at":"2022-09-04T00:00:35.202Z","dependency_job_id":null,"html_url":"https://github.com/aerisweather/winstonjs-transport-http-headers","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aerisweather/winstonjs-transport-http-headers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerisweather%2Fwinstonjs-transport-http-headers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerisweather%2Fwinstonjs-transport-http-headers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerisweather%2Fwinstonjs-transport-http-headers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerisweather%2Fwinstonjs-transport-http-headers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aerisweather","download_url":"https://codeload.github.com/aerisweather/winstonjs-transport-http-headers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aerisweather%2Fwinstonjs-transport-http-headers/sbom","scorecard":{"id":169042,"data":{"date":"2025-08-11","repo":{"name":"github.com/aerisweather/winstonjs-transport-http-headers","commit":"912a4a1c139b7f6946ae97082e9464847a03d0d8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T15:51:59.581Z","repository_id":57398179,"created_at":"2025-08-16T15:51:59.581Z","updated_at":"2025-08-16T15:51:59.581Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807862,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","logging","nodejs","winston"],"created_at":"2024-11-11T22:05:47.718Z","updated_at":"2026-05-09T05:06:29.454Z","avatar_url":"https://github.com/aerisweather.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"WinstonJS Transport: HTTP Headers\n=================================\n\nA WinstonJS transport that logs to HTTP headers, useful for sending profiling data to the browser that doesn't muddle the response body.\n\nMaster Build Status:\n[![Build Status](https://travis-ci.org/aerisweather/winstonjs-transport-http-headers.svg?branch=master)](https://travis-ci.org/aerisweather/winstonjs-transport-http-headers)\n[![Coverage Status](https://coveralls.io/repos/aerisweather/winstonjs-transport-http-headers/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/aerisweather/winstonjs-transport-http-headers?branch=master)\n\n__This project sponsored by:__\n\n[![AerisWeather](http://branding.aerisweather.com/logo-dark-small.png)](http://www.aerisweather.com) - Empowering the next generation, [aerisweather.com](https://www.aerisweather.com)\n\nInstallation\n------------\n\nThis project is available on npm:\n\n```sh\nnpm install --save winstonjs-transport-http-headers\n```\n\nExample\n-------\n\n**Note:** A full example can be found in `example.js` which integrates an ExpressJS HTTP Server\n\nThe logger should be added to the response, probably in middleware:\n\n```javascript\n// Middleware example to setup our logger.\napp.use(function(req, res, next) {\n    res.logger = new (winston.Logger)({\n        transports: [\n            // Here is our new logger\n            new HttpHeaderTransport({\n                setHeader: res.set.bind(res),\n                level: 'debug'\n            }),\n            // We can use the HTTP Header logger in combination with other loggers too.\n            new (winston.transports.Console)({\n                level: 'warn'\n            })\n        ],\n        //Setup Levels for this logger\n        levels:     {\n            warn: 4,\n            info: 6,\n            debug: 7\n        }\n    });\n    next();\n});\n```\n\nThen in an action, we can log something to the response:\n```javascript\n// Will log to a header: `x-logger-0-debug`\nres.logger.log('debug', 'Basic Log Message');\n\n// Will log to both a header and the console (as defined above)\nres.logger.log('warn', 'Uh oh');\n```\n\nDocs\n----\n\n### new HttpHeaders(options)\n\n| Param        | Type       | Default       | Description                                                               |\n| ------------ | ---------- | ------------- | ------------------------------------------------------------------------- |\n| setHeader    | `function` |               | A callable (key, value) that will set the header to the request. |\n| silent       | `boolean`  | `false`       | If enabled, logger will not log to HTTP Header, will not emit events. |\n| level        | `level`    | `\"debug\"`     | What level this logger should respond to, see Winston docs for more info. |\n| headerPrefix | `string`   | `\"X-Logger-\"` | A callable that provides a string that is prepended to each header. |\n| getHeaderId  | `function` | `(default)`   | A callable that gets a header ID based on passed options. |\n| cleanId      | `function` | `(default)`   | Cleans a string into a nice HTTP friendly header ID. |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerisweather%2Fwinstonjs-transport-http-headers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faerisweather%2Fwinstonjs-transport-http-headers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faerisweather%2Fwinstonjs-transport-http-headers/lists"}