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.34.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce99036f32459ef70377583d11d9c636d06ce562e8e39ddc00612161ef946da |
|
MD5 | 05f56d79175a3418c5ef657153b21335 |
|
BLAKE2b-256 | a4c9ac98033fe4ef578cd96b4945868facc1f3a85433cd6b076d81211eb05745 |
Close
Hashes for django_simple_ip_restrict-1.0.34-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 756e23fbdf7f2d70703cd0705478c3ef4387e12eaa5787befd417932e621a48e |
|
MD5 | e4ccda9f27b073f99ac44a57699a8c1c |
|
BLAKE2b-256 | 8ffc52fe2334ce48a2c64111e52858c726ff26524bfe81700139496533e5f779 |