Django Cookie Filter
Django middleware which removes all unwanted cookies - useful for improving cache hit ratios when analytics cookies interfere with caching.
Installation
Using pip:
$ pip install django-cookiefilter
Edit your Django project's settings module, and add the middleware to the start of MIDDLEWARE:
MIDDLEWARE = [
"cookiefilter.middleware.CookieFilterMiddleware",
# ...
]
Configuration
Out of the box the standard Django cookie names will work without any other configuration. However
if your project uses different or additional cookie names, edit COOKIEFILTER_ALLOWED in your
project's settings module:
COOKIEFILTER_ALLOWED = [
"analytics",
"csrftoken",
"django_language",
"messages",
"sessionid",
]
Metadata
Release files for django-cookiefilter 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_cookiefilter-1.2.tar.gz | 4.5 kB | With provenance | Details for django_cookiefilter-1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_cookiefilter-1.2-py3-none-any.whl | Python 3 | none | any | Details for django_cookiefilter-1.2-py3-none-any.whl |
Total release size: 8.7 kB
Security for django-cookiefilter 1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.