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.27.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9394b254d6c2368b67a48488191ef48f67d29987ac3342d5cb67ded7ea38b46 |
|
MD5 | 283457ec8d0a522c68de3341d7af08be |
|
BLAKE2b-256 | 123b918e36ce2385a87b8c7c521d936790582ccae7e2101017f10d74218ef966 |
Close
Hashes for django_simple_ip_restrict-1.0.27-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e035c3d5fa123906c28a55e74bef0e5ea0a16a0295767d97da8de6b4d51e760b |
|
MD5 | 87693a49164eab669b369c82672cfd04 |
|
BLAKE2b-256 | 3f4896a7d38a93aa45dc2ad503c9360b5c525028b54a14d3ef084e9b3731e482 |