WSGI Middlewares for Web Application Security
Project description
Guard is a collection of generic WSGI middlewares and utilities for improving the security of a web application.
Content Security Policy
guard.ContentSecurityPolicy provides a WSGI middleware that can be used to provide a content security policy for a web application.
Usage
import guard, wsgi_app
# Default Policy
app = guard.ContentSecurityPolicy(wsgi_app.application)
# Custom Directives
app = guard.ContentSecurityPolicy(wsgi_app.application, {"img-src": ["*"]})
# Report Only
app = guard.ContentSecurityPolicy(wsgi_app.application, report_only=True)
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
guard-1.0.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file guard-1.0.1.tar.gz
.
File metadata
- Download URL: guard-1.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cce6ce567dabf58bb51215766ac82dfcdb7bd8ac0474917d60d7d6d7f0082bce |
|
MD5 | 2f2ce362dbe023654df5bfd229b24e4e |
|
BLAKE2b-256 | d16b1bb7366192cd0b169823fda849811b1b35e2cdec052c66e6c138a7a06a87 |
File details
Details for the file guard-1.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: guard-1.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 311c3bccad87dbd87619dd38dd7784129be3687ac9dafadf30a849d9978e1718 |
|
MD5 | dd5d26a84add0162e135d6b4b632e243 |
|
BLAKE2b-256 | 6224488dbf2bbb56596ce62580ce9676bb2081fef8fcbe22c953cbdda76e2abf |