Skip to main content

Opt out of the privacy invading Google FLoC program.

Project description

django-nofloc nlshield

django-nofloc is a simple Django app that provides a middleware to let Google Chrome know that your website should not be included in the Google FLoC program. Essentially you’re opting out of this privacy invading program that is default for all Chrome users.

Version: 0.1.0

Project Links: Mailing List - Contributing

Author: Peter Sanchez (

Because this is a simple middleware we have no issue tracker for it. If there are any issues please send an email to the mailing list.

Python / Django Support

  • Python 3.6+ for Django versions 2.2+



pip install django-nofloc

Basic Manual Install:

$ python build
$ sudo python install

Then just add the nofloc.middleware.NoFLoCMiddleware to your MIDDLEWARE setting. The placement order shouldn’t matter.


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

If you need to alter this header within a view or some other case, this app may not be a good tool for you to use in it’s current state. It’s set specifically to disable FLoC. Review your use case before installing this app. You can also submit a patch to make this more configurable if you’d like :)


Because we’re tired of big tech spying on us. For more info see:


We accept patches submitted via hg email which is the patchbomb extension included with Mercurial.

The mailing list where you submit your patches is ~netlandish/ You can also view the archives on the web here:

To quickly setup your clone of django-nofloc to submit to the mailing list just edit your .hg/hgrc file and add the following:

to = ~netlandish/

flagtemplate = "django-nofloc"

git = 1

We have more information on the topic here:

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-nofloc-0.2.tar.gz (5.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page