Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fastify-floc-off

Package Overview
Dependencies
Maintainers
0
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fastify-floc-off

Fastify plugin to opt out of Google's Topics advertising-surveillance API

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

fastify-floc-off

GitHub release npm version Build status Coverage status code style: Prettier

Fastify plugin to opt-out of Google's Topics advertising-surveillance API

Overview

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.

You can read more about the issues that surround Google's FLoC 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.

Installation

Install using npm:

npm i fastify-floc-off

For Fastify v4.x support, use fastify-floc-off@2.1.11.

Example usage

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");
});

Contributing

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.

Acknowledgements

  • Aras Abbasi - TypeScript support

License

fastify-floc-off is licensed under the MIT license.

Keywords

FAQs

Package last updated on 02 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc