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

New version is Topics API

Python / Django Support

  • Python 3.8+
  • Django versions 3+

Usage

Install django-floc-disable:

pip install django-floc-disable

Add it to your MIDDLEWARE tuple in settings.py:

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

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

Reference:

Support

License

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

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages