antidot-fw/no-floc-middleware

Antidot Framework PSR-15 NO FLoC Middleware

1.0.3 2021-06-05 12:00 UTC

This package is auto-updated.

Last update: 2024-10-30 01:42:56 UTC


README

Scrutinizer Code Quality Code Coverage Type Coverage Build Status

PSR-15 middleware to opting your Website out of Google's FLoC Network

Installation

Using composer

composer require antidot-fw/no-floc-middleware

Using Laminas config Aggregator

it install the library automatically

Usage

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