jpmurray/laravel-nofloc
jpmurray/laravel-nofloc is a Laravel package that adds the Permissions-Policy: interest-cohort=() header to opt your app out of Google FLoC cohort tracking. Simple to install and configure, it helps protect visitor privacy by default.
Permissions-Policy: interest-cohort=() on responses. As a PM, the decision it informs is whether "we opt users out of ad-tech cohort tracking" is a claim you make in marketing and a checkbox in a compliance review — and whether it's enforced by code or by promise. Code-enforced wins.X-Content-Type-Options).interest-cohort=()". Cheap credibility signal, zero runtime risk — but only if we actually send the header, which means owning the code rather than depending on an unmaintained package.composer.json attached.Consider it (or, more accurately, consider copying its 15 lines) when:
Look elsewhere — or rather, look at the pattern and move on — when:
composer require is strictly worse than php artisan make:middleware.For executives: This is a small, MIT-licensed Laravel add-on that sends one HTTP response header telling Google not to include our visitors in its FloC ad-cohort tracking. The concept is right and the implementation is trivial. Two caveats: FloC has since been discontinued by Google, so this specific header no longer neutralizes a live threat; and the package itself is a 2021 one-person project with no adoption and no maintenance. Recommendation: do not take it on as a dependency. Instead, we adopt the pattern — a global response-header middleware we own — which gives us the same privacy signal, plus the ability to extend it to whatever replaces FloC, with no supply-chain exposure and no maintenance question. Cost is measured in hours, not sprints.
For engineering: The whole package is a middleware that appends Permissions-Policy: interest-cohort=() to outgoing responses, registered in the HTTP kernel. We should write our own equivalent into the base middleware group, add a feature test asserting the header is present on a representative route, and fold it into the existing security-headers middleware if we already have one rather than adding a second class. Note the header syntax has evolved (interest-cohort was the FloC-specific token; current Permissions-Policy grammars use different directive names), so if we ship this we should ship it alongside a review of what our headers actually need to say today — the value here is the mechanism and the precedent, not the literal string.
How can I help you explore Laravel packages today?