django-http-referrer-policy provides a middleware class implementing the Referrer-Policy header for Django-powered sites.
Project description
django-referrer-policy provides a middleware class implementing the Referrer-Policy header for Django-powered sites.
Documentation
The full documentation is at https://django-http-referrer-policy.readthedocs.io.
Quickstart
Install Django HTTP Referrer Policy:
pip install django-http-referrer-policy
Add it to your INSTALLED_APPS:
INSTALLED_APPS = (
...
'django_http_referrer_policy',
...
)
Add Django HTTP Referrer Policy Middleware to your settings:
MIDDLEWARE = [
...
'django_http_referrer_policy.middleware.ReferrerPolicyMiddleware',
...
]
Add variable REFERRER_POLICY to your settings with valid value:
REFERRER_POLICY = 'no-referrer'
More details about valid referrer policies: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy#Syntax
Running Tests
Does the code actually work?
source <YOURVIRTUALENV>/bin/activate (myenv) $ pip install tox (myenv) $ tox
Credits
Maintainable version of original library.
Tools used in rendering this package:
History
1.0.1 (2019-08-23)
Update setup.py
Update docs for setting value in django-settings.
1.0.0 (2019-08-11)
First release on PyPI.
Project details
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
File details
Details for the file django-http-referrer-policy-1.0.1.tar.gz
.
File metadata
- Download URL: django-http-referrer-policy-1.0.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9847711f55991a9efd3a47e272370da0986c9dac4916e1ab1b4b6e1885b69365 |
|
MD5 | b1efda03acf0ce8bdfba71525d714833 |
|
BLAKE2b-256 | 86bb8d76322c5e436973cf8939a815156ce55f8a3fba31cf16600c215c64d446 |
File details
Details for the file django_http_referrer_policy-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: django_http_referrer_policy-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a867e2ac3f83b162a2bc1241dc2ed209e555e709e6566fef6bb1f716c733c00 |
|
MD5 | 329679b0cd917bc87d55546169b126fd |
|
BLAKE2b-256 | 945b4526d779c227479f51b368155a32d5f13072ec64badad36670497dfd2f2e |