Skip to content

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

License

Notifications You must be signed in to change notification settings

nhymxu/django-floc-disable

Repository files navigation

django-floc-disable

unit test

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

Python / Django Support

  • Python 3.6+
  • Django versions 3+

Usage

Install django-floc-disable:

pip install django-floc-disable

Add it to your INSTALLED_APPS:

MIDDLEWARE = (
    # ...
    'django_floc_disable.middleware.FLoCDisableMiddleware',
    # ...
)

This will set the Permissions-Policy header to a value of interest-cohort=() for every request served by Django.

Support

License

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