
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
fastify-floc-off
Advanced tools
Fastify plugin to opt-out of Google's Topics advertising-surveillance API
The 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.
This was originally created to opt-out of Google's FLoC (Federated Learning of Cohorts), which has since been replaced with their Topics API, though it has the same privacy issues.
More information about the issues surrounding Google's FLoC can be found on EFF and Plausible Analytics.
Helmet and 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.
Install using npm:
npm i fastify-floc-off
| Plugin version | Fastify version |
|---|---|
>=3.x | ^5.x |
>=2.x <3.x | ^4.x |
>=1.x <2.x | ^3.x |
Please note that if a Fastify version is out of support, then so are the corresponding versions of this plugin in the table above. See Fastify's LTS policy for more details.
const Fastify = require("fastify");
const flocOff = require("fastify-floc-off");
const server = Fastify();
server.register(flocOff);
server.get("/", (_req, res) => {
res.send("ok");
});
server.listen(3000, (err) => {
if (err) throw err;
console.log("Server listening on 3000");
});
Contributions are welcome, and any help is greatly appreciated!
See the contributing guide for details on how to get started. Please adhere to this project's Code of Conduct when contributing.
fastify-floc-off is licensed under the MIT license.
4.0.0 (2025-10-09)
.nvmrc for node-version (#307) (284dd4d)setFlocPermissionsHeader to module scope (#289) (fb6eb2c).nvmrc file (#296) (0d08df2)done over next for callback name (#290) (f45abb5)options over opts for param name (#288) (02e9fdd)FAQs
Fastify plugin to opt out of Google's Topics advertising-surveillance API
The npm package fastify-floc-off receives a total of 212 weekly downloads. As such, fastify-floc-off popularity was classified as not popular.
We found that fastify-floc-off demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.