loophp/go-unfloc-yourself-bundle

Adds a specific header to every response to disable Google's usage of your site in it's FLoC tracking method.

1.0.0 2021-04-23 17:42 UTC

This package is auto-updated.

Last update: 2021-09-28 07:02:25 UTC


README

Latest Stable Version GitHub stars Total Downloads GitHub Workflow Status Scrutinizer code quality Type Coverage Code Coverage License Donate! Donate!

Go Unfloc Yourself

Description

A bundle for Symfony 5 that adds a Permissions-Policy header in all the responses to prevent the use of new Google's "Federated Learning of Cohorts" tracking method, namely FLoC.

Basically, it adds a specific header to every response to disable Google's usage of your site in it's FLoC tracking method.

For better performance, it is advised to edit the .htaccess or alter the webserver configuration.

Features

If an existing Permissions-Policy header is found, the bundle will not change that value.

The added headers is: Permissions-Policy: interest-cohort=()

Installation

composer require loophp/go-unfloc-yourself-bundle

Usage

Once installed, there is nothing else to do.

Interesting links

Code quality, tests and benchmarks

Every time changes are introduced into the library, Github run the tests.

The library has tests written with PHPSpec. Feel free to check them out in the spec directory. Run composer phpspec to trigger the tests.

Before each commit some inspections are executed with GrumPHP, run composer grumphp to check manually.

The quality of the tests is tested with Infection a PHP Mutation testing framework, run composer infection to try it.

Static analyzers are also controlling the code. PHPStan and PSalm are enabled to their maximum level.

Contributing

Feel free to contribute by sending Github pull requests. I'm quite reactive :-)

If you can't contribute to the code, you can also sponsor me on Github or Paypal.

Changelog

See CHANGELOG.md for a changelog based on git commits.

For more detailed changelogs, please check the release changelogs.