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.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcd2cd2fa1aa0db68f4b18757f014c8a0d8c5a475a5b69e8daa60994175e7957 |
|
MD5 | ebd3672e626d046d62084838f749c040 |
|
BLAKE2b-256 | d5b9f459b52a65134b7fc3720fe4f41a6a7b2cfd09b8b8db67e90cff1cfc94f0 |
Close
Hashes for django_simple_ip_restrict-1.0.24-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | beddb23b4b660097bd123db9ba21b1630d04f3cef767fb89048de3879f249af9 |
|
MD5 | bd6f3ba8bfd998b38fab1cd8d56fbea2 |
|
BLAKE2b-256 | 5745b5089179b38912025391f8e38f893e8b403f842b0a6573ff7b55fd4e2172 |