Django middleware to disable Google FLoC tracking
Project description
django-floc-disable
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:
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/browsing-topics
- https://developers.google.com/privacy-sandbox/private-advertising/topics/web/controls#opt_out_as_a_developer
Support
- Issues: https://github.com/nhymxu/django-floc-disable/issues
- Here you can donate for this project.
License
The MIT License (MIT). Please see License File for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_floc_disable-1.2.0.tar.gz.
File metadata
- Download URL: django_floc_disable-1.2.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b076da241daade517cd74f60f3a5ed5e80dd9d91de9c2442cdd9f96d294e8962
|
|
| MD5 |
4b1e6a2254b1352e319c2b95a7b9d3c7
|
|
| BLAKE2b-256 |
8bcbd25c2f5999b5fc2f4165ad5dc3ed086552889be54b05c0ab453d604ce752
|
File details
Details for the file django_floc_disable-1.2.0-py3-none-any.whl.
File metadata
- Download URL: django_floc_disable-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
399b13b97425593bdfe38cb046249bc9917b74a0c44e343f991c7458d12f05a9
|
|
| MD5 |
4746c5083e3bc3e23900227393e34dad
|
|
| BLAKE2b-256 |
8064021da870aeaaf25e077a41629225e53a3027a683c6c3a32df96385cbc749
|