{"id":15821462,"url":"https://github.com/fdawgs/fastify-floc-off","last_synced_at":"2025-07-22T16:07:18.709Z","repository":{"id":39753323,"uuid":"362382476","full_name":"Fdawgs/fastify-floc-off","owner":"Fdawgs","description":"Fastify plugin to opt-out of Google's Topics advertising-surveillance API","archived":false,"fork":false,"pushed_at":"2025-06-25T18:29:59.000Z","size":488,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-25T18:37:07.450Z","etag":null,"topics":["fastify","floc","google","nodejs","plugin","topics"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/fastify-floc-off","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/Fdawgs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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,"zenodo":null},"funding":{"github":"Fdawgs"}},"created_at":"2021-04-28T07:47:14.000Z","updated_at":"2025-06-25T18:26:55.000Z","dependencies_parsed_at":"2023-12-12T21:24:11.612Z","dependency_job_id":"cb5ccdc8-244c-4ccc-914c-2795665e1698","html_url":"https://github.com/Fdawgs/fastify-floc-off","commit_stats":{"total_commits":346,"total_committers":5,"mean_commits":69.2,"dds":"0.36416184971098264","last_synced_commit":"22ea6c7109ea8b37454c71537073ff18b8c09d2b"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/Fdawgs/fastify-floc-off","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Ffastify-floc-off","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Ffastify-floc-off/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Ffastify-floc-off/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Ffastify-floc-off/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fdawgs","download_url":"https://codeload.github.com/Fdawgs/fastify-floc-off/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fdawgs%2Ffastify-floc-off/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266525073,"owners_count":23942873,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["fastify","floc","google","nodejs","plugin","topics"],"created_at":"2024-10-05T07:22:27.177Z","updated_at":"2025-07-22T16:07:18.687Z","avatar_url":"https://github.com/Fdawgs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Fdawgs"],"categories":[],"sub_categories":[],"readme":"# fastify-floc-off\n\n[![GitHub release](https://img.shields.io/github/release/Fdawgs/fastify-floc-off.svg)](https://github.com/Fdawgs/fastify-floc-off/releases/latest/)\n[![npm version](https://img.shields.io/npm/v/fastify-floc-off)](https://npmjs.com/package/fastify-floc-off)\n[![CI](https://github.com/Fdawgs/fastify-floc-off/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Fdawgs/fastify-floc-off/actions/workflows/ci.yml)\n[![Coverage status](https://coveralls.io/repos/github/Fdawgs/fastify-floc-off/badge.svg?branch=main)](https://coveralls.io/github/Fdawgs/fastify-floc-off?branch=main)\n[![code style: Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat)](https://github.com/prettier/prettier)\n\n\u003e Fastify plugin to opt-out of Google's Topics advertising-surveillance API\n\n## Overview\n\nThe `fastify-floc-off` plugin adds the \"interest-cohort=()\" directive to the `Permissions-Policy` response header to opt-out of Google's Topics advertising-surveillance API. It will create a new header if one does not already exist.\n\nThis was originally created to opt-out of Google's FLoC (Federated Learning of Cohorts), which has since been replaced with their [Topics API](https://github.com/patcg-individual-drafts/topics), though it has the same privacy issues.\n\nMore information about the issues surrounding Google's FLoC can be found on [EFF](https://eff.org/deeplinks/2021/03/googles-floc-terrible-idea) and [Plausible Analytics](https://plausible.io/blog/google-floc).\n\n[Helmet](https://github.com/helmetjs/helmet) and [fastify-helmet](https://github.com/fastify/fastify-helmet) do not support the `Permissions-Policy` response header setting yet, so this plugin was created out of a need for an easy way to disable/opt-out of Google's Topics API. This ensures users accessing web applications are not subject to Google's unsolicited tracking.\n\n## Installation\n\nInstall using `npm`:\n\n```bash\nnpm i fastify-floc-off\n```\n\n### Compatibility\n\n| Plugin version | Fastify version |\n| -------------- | --------------- |\n| `\u003e=3.x`        | `^5.x`          |\n| `\u003e=2.x \u003c3.x`   | `^4.x`          |\n| `\u003e=1.x \u003c2.x`   | `^3.x`          |\n\nPlease note that if a Fastify version is out of support, then so are the corresponding versions of this plugin\nin the table above.\nSee [Fastify's LTS policy](https://github.com/fastify/fastify/blob/main/docs/Reference/LTS.md) for more details.\n\n## Example usage\n\n```js\nconst Fastify = require(\"fastify\");\nconst flocOff = require(\"fastify-floc-off\");\n\nconst server = Fastify();\nserver.register(flocOff);\n\nserver.get(\"/\", (_req, res) =\u003e {\n\tres.send(\"ok\");\n});\n\nserver.listen(3000, (err) =\u003e {\n\tif (err) throw err;\n\tconsole.log(\"Server listening on 3000\");\n});\n```\n\n## Contributing\n\nContributions are welcome, and any help is greatly appreciated!\n\nSee [the contributing guide](https://github.com/Fdawgs/.github/blob/main/CONTRIBUTING.md) for details on how to get started.\nPlease adhere to this project's [Code of Conduct](https://github.com/Fdawgs/.github/blob/main/CODE_OF_CONDUCT.md) when contributing.\n\n## Acknowledgements\n\n- [**Aras Abbasi**](https://github.com/uzlopak) - TypeScript support\n\n## License\n\n`fastify-floc-off` is licensed under the [MIT](./LICENSE) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdawgs%2Ffastify-floc-off","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdawgs%2Ffastify-floc-off","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdawgs%2Ffastify-floc-off/lists"}