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.37.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a2f676a648d35149ce5659a0ef8242f56f9b3847a78e6301981bc40011762b4 |
|
MD5 | 81555585a4e4700a9f8f99269e956ba6 |
|
BLAKE2b-256 | ebfd6d42a5950df77c94965699352835c0c335a2fe07434e0b8e5f53f494230e |
Close
Hashes for django_simple_ip_restrict-1.0.37-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57b96b2d83063e22b958d57b4229e0edebad206a46d2903a6c33f08782d99953 |
|
MD5 | ff9a413e95c46d467f85f64861ff76bf |
|
BLAKE2b-256 | 0db9bc65639974a895d2879a002ecc70f441d893c9e454f951c8510fcf05dbcc |