Apply an IP restriction to specific routes
Project description
django-simple-ip-restrict
This middleware allows you to mark Django URL namespaces as unavailable to all requests except those coming from a whitelisted IP subnet.
Instructions
Add to the list of MIDDLEWARE:
"django_simple_ip_restrict.middleware.ip_filter",
Then you can set the following keys on settings.py:
- IP_PROTECTED_NAMESPACES: list of namespaces to block (default: ["admin"])
- IP_NETWORKS_WHITELIST: list of subnets to allow, in CIDR notation
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
Built Distribution
Close
Hashes for django_simple_ip_restrict-1.0.36.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cca959965d04f2bf98e1943b285f1125df4abb8b9cefd0da3d9b28c8c071c293 |
|
MD5 | 5f6570ae66fb3d03babc6931c838c983 |
|
BLAKE2b-256 | 6f2b264fbf0be903832e4e2aebe833defdaba073bd42591929d643f6e427f55a |
Close
Hashes for django_simple_ip_restrict-1.0.36-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94ec240dd9e817d23fcc613c509489e8c6d692a81e2b957a2ddea331d41a8412 |
|
MD5 | b74b1cfb4f25e979202c40a27488468f |
|
BLAKE2b-256 | 66bfb2db8fcd0de22dc3992deba28f923a4013321b48ec8323a6fb8632cce786 |