承接 nhymxu/php-floc-disable 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nhymxu/php-floc-disable

Composer 安装命令:

composer require nhymxu/php-floc-disable

包简介

PHP middleware to disable Google's Federated Learning of Cohorts (FLoC) tracking

README 文档

README

packagist phpunit

PHP middleware to disable Google's Federated Learning of Cohorts (FLoC) tracking

Usage

This package is installable and auto-loadable via Composer as nhymxu/php-floc-disable.

composer require nhymxu/php-floc-disable

Slim 4 integration

Add the FlocDisableMiddleware to set the header

Example: public/index.php

<?php

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Nhymxu\FlocDisable\FlocDisableMiddleware;
use Slim\Factory\AppFactory;

require_once __DIR__ . '/../vendor/autoload.php';

$app = AppFactory::create();

// Add Slim routing middleware
$app->addRoutingMiddleware();

// Set the header to disable FLoC.
$app->add(new FlocDisableMiddleware());

$app->addErrorMiddleware(true, true, true);

// Define app routes
$app->get('/', function (Request $request, Response $response) {
    $response->getBody()->write('Hello, World!');
    return $response;
})->setName('root');

// Run app
$app->run();

Support

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 102
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固