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.
Release files for django-floc-disable 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_floc_disable-1.2.0.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_floc_disable-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.9 kB
Release files / django_floc_disable-1.2.0.tar.gz
| Download URL | django_floc_disable-1.2.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b076da241daade517cd74f60f3a5ed5e80dd9d91de9c2442cdd9f96d294e8962
|
|
BLAKE2b-256 checksum How to use checksums |
8bcbd25c2f5999b5fc2f4165ad5dc3ed086552889be54b05c0ab453d604ce752
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / django_floc_disable-1.2.0-py3-none-any.whl
| Download URL | django_floc_disable-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
399b13b97425593bdfe38cb046249bc9917b74a0c44e343f991c7458d12f05a9
|
|
BLAKE2b-256 checksum How to use checksums |
8064021da870aeaaf25e077a41629225e53a3027a683c6c3a32df96385cbc749
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|