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.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >= 7.2.5
- symfony/framework-bundle: ^5.2
Requires (Dev)
- drupol/php-conventions: ^4.0.2
- friends-of-phpspec/phpspec-code-coverage: ^6.1
- infection/infection: ^0.21
- infection/phpspec-adapter: ^0.1.2
- phpspec/phpspec: ^7.0
- symfony/http-foundation: ^5.2
This package is auto-updated.
Last update: 2022-02-28 07:46:07 UTC
README
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
- What is Federated Learning of Cohorts (FLoC)?
- Federated Learning of Cohorts (FLoC)
- Google’s FLoC Is a Terrible Idea
- Block FLoC With Duckduckgo
- Am I FLoCed?
- Pi-Hole - Network-wide Ad Blocking
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.