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.35.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67a26dadcc72c0e8c01572b6f27bba5bcdf478c261337cb1eebb25e28e31da88 |
|
MD5 | d8b095e36e2f28051e9ef8dc48cac49c |
|
BLAKE2b-256 | cebf96fdd9f008fa86ec6f1ebf8051c4f678c6390b58d11a9490505e5fc35400 |
Close
Hashes for django_simple_ip_restrict-1.0.35-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5180d8c765535d5e28893ea4d6740ad16bea87147ac5edd5199cf413440faeb4 |
|
MD5 | a05f3a76c7e0b8594cbad9261fc4333b |
|
BLAKE2b-256 | f959de69b261e92d08e1f72e6cf07d0151ca327409188dcfcbd0e50e37efd0d0 |