{"id":13836172,"url":"https://github.com/lolo32/fastify-response-time","last_synced_at":"2026-01-19T04:33:42.326Z","repository":{"id":25309731,"uuid":"103703277","full_name":"lolo32/fastify-response-time","owner":"lolo32","description":"Add X-Response-Time header at each request (in ms) for Fastify","archived":false,"fork":false,"pushed_at":"2025-07-24T08:21:23.000Z","size":33,"stargazers_count":17,"open_issues_count":19,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-02T01:41:30.447Z","etag":null,"topics":["fastify"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lolo32.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2017-09-15T21:34:09.000Z","updated_at":"2023-05-19T10:31:39.000Z","dependencies_parsed_at":"2023-11-28T15:28:54.038Z","dependency_job_id":"932411d5-0203-423e-a92d-eee1b0e39186","html_url":"https://github.com/lolo32/fastify-response-time","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.2222222222222222,"last_synced_commit":"e10faa9a358eb4194a4d9aedc960a816f55cf1a5"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lolo32/fastify-response-time","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolo32%2Ffastify-response-time","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolo32%2Ffastify-response-time/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolo32%2Ffastify-response-time/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolo32%2Ffastify-response-time/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lolo32","download_url":"https://codeload.github.com/lolo32/fastify-response-time/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lolo32%2Ffastify-response-time/sbom","scorecard":{"id":597822,"data":{"date":"2025-08-11","repo":{"name":"github.com/lolo32/fastify-response-time","commit":"e10faa9a358eb4194a4d9aedc960a816f55cf1a5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 1/15 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":"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":"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":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T23:36:40.994Z","repository_id":25309731,"created_at":"2025-08-20T23:36:40.999Z","updated_at":"2025-08-20T23:36:40.999Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28561842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T03:31:16.861Z","status":"ssl_error","status_checked_at":"2026-01-19T03:31:15.069Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["fastify"],"created_at":"2024-08-04T15:00:37.302Z","updated_at":"2026-01-19T04:33:42.296Z","avatar_url":"https://github.com/lolo32.png","language":"JavaScript","readme":"# fastify-response-time\n\n[![Build Status](https://travis-ci.org/lolo32/fastify-response-time.svg?branch=master)](https://travis-ci.org/lolo32/fastify-response-time)\n[![Coverage Status](https://coveralls.io/repos/github/lolo32/fastify-response-time/badge.svg?branch=master)](https://coveralls.io/github/lolo32/fastify-response-time?branch=master)\n[![Known Vulnerabilities](https://snyk.io/test/github/lolo32/fastify-response-time/badge.svg)](https://snyk.io/test/github/lolo32/fastify-response-time)\n\nAdd `X-Response-Time` header at each request for Fastify. The unit used is milliseconds.\n\nAdd `Server-Timing` header, that could be used to pass timing server to client (useful to debug).\nYou could find some documentation at [W3C Server-Timing](https://www.w3.org/TR/server-timing/) documentation.\n\n**You need to use Fastify version 0.31 or newer, the hook used (onSend) was added in this version**\n\n_If you need older Fastify version, use version 1.0.1 of this plugin_\n\n## Install\n\n``\nnpm install --save fastify-response-time\n``\n\n## Usage\n\nAdd it to you project with `register` and you are done!\n\n```javascript\n// Register the plugin\nfastify.register(require(\"fastify-response-time\"));\n\n// Define a new route in hapijs notation\nfastify.route({\n  method: \"GET\",\n  url: \"/header-hapi\",\n  handler: (request, reply) =\u003e {\n    reply.send();\n  }\n});\n\n// Define a new route in express notation\nfastify.get(\"/header-express\", (request, reply) =\u003e {\n  reply.send();\n});\n\n// Add server timing information\nfastify.get(\"/header-express\", (request, reply) =\u003e {\n  reply.setServerTiming(\"cache\", 5.3, \"Cache read\");\n  reply.send();\n});\n```\n\nBoth examples responds with:\n\n    \u003c HTTP/1.1 200 OK\n    \u003c Content-Type: application/json\n    \u003c Content-Length: 17\n    \u003c X-Response-Time: 0.08\n    \u003c Date: Fri, 15 Sep 2017 21:14:33 GMT\n    \u003c Connection: keep-alive\n    \u003c\n\n## Options\n\nThis plugin allow you to specify options:\n\n- `header` can be used to change default header name to something else _(`X-Response-Time` by default)_\n- `digits` to specify the number of digits in the response _(`2` by default, so 1.03)_\n\n## `reply.setServerTiming` usage\n\n`reply.setServerTiming( name , duration , description ) =\u003e boolean`\n\nWith:\n\n* `name`: _[mandatory]_ the name of the measure, and must be unique. Any already existing value will not be replaced\n* `duration`: _[optional]_ the duration, that must be an integer or float. If not needed, pass `0` or `null`\n* `description`: _[optional]_ the description is needed. It must be a string\n* return `true` if the measure is added the the list that will be send with the request, `false` is the name already\n  exists\n\nThe response will be:\n\n    \u003c HTTP/1.1 200 OK\n    \u003c Content-Type: application/json\n    \u003c Content-Length: 17\n    \u003c X-Response-Time: 0.08\n    \u003c Server-Timing: cache;dur=5.3;desc=\"Cache read\"\n    \u003c Date: Fri, 15 Sep 2017 21:14:33 GMT\n    \u003c Connection: keep-alive\n    \u003c\n","funding_links":[],"categories":["\u003ch2 align=\"center\"\u003eAwesome Fastify\u003c/h2\u003e"],"sub_categories":["\u003ch2 align=\"center\"\u003eEcosystem\u003c/h2\u003e"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolo32%2Ffastify-response-time","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flolo32%2Ffastify-response-time","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flolo32%2Ffastify-response-time/lists"}