PSR-15 middleware to opting your Website out of Google's FLoC Network
Using composer
composer require antidot-fw/no-floc-middleware
it install the library automatically
In Antidot, Mezzio or any other PSR-15 middleware application, add it to the global pipeline.
<?php
declare(strict_types=1);
use Antidot\Application\Http\Application;
use Antidot\Application\Http\Middleware\ErrorMiddleware;
use Antidot\Application\Http\Middleware\RouteDispatcherMiddleware;
use Antidot\Application\Http\Middleware\RouteNotFoundMiddleware;
use Antidot\Logger\Application\Http\Middleware\ExceptionLoggerMiddleware;
use Antidot\Logger\Application\Http\Middleware\RequestLoggerMiddleware;
+use Antidot\NoFLoC\NoFLoCMiddleware;
return static function (Application $app) : void {
+ $app->pipe(NoFLoCMiddleware::class)
$app->pipe(ErrorMiddleware::class);
$app->pipe(ExceptionLoggerMiddleware::class);
$app->pipe(RequestLoggerMiddleware::class);
$app->pipe(RouteDispatcherMiddleware::class);
$app->pipe(RouteNotFoundMiddleware::class);
};