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.25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70e9d6b810648569795f9e56edbdaac4aa29bd1db5650ff6ee73459291876dbf |
|
MD5 | 383a36bdb38306465a9012544ab9ca89 |
|
BLAKE2b-256 | b69fc37ab266c4ee8f769f8579cf57da1871a065812dd507b6af59c1b5c76a74 |
Close
Hashes for django_simple_ip_restrict-1.0.25-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54843d3b99fb04568e66961e587a9470dd21ccd20af506511b9ffd7bde1385c5 |
|
MD5 | 45446e999951c7e7e08e48991c0652da |
|
BLAKE2b-256 | b7c2123d55f8f3b8580d668bc11b85d53d5c4c75a04ea97da04536a366f36136 |