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.33.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | adbadca83214858b640e0ef83c9a6897ce0579a7c90ba7e8fe4ae7769d359682 |
|
MD5 | 1546ce7755d41f42ca2bca2df5d7caf8 |
|
BLAKE2b-256 | f4747585b8bf2e25a88beaa3ec982472b5129a0bed4529e02abff30621d1c7b2 |
Close
Hashes for django_simple_ip_restrict-1.0.33-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | e65115d3b761ac8c59dad534765392ee937c7938924536d9ce400f048c5d4e29 |
|
MD5 | b021d8e53f2d9a6b76aea428524078e7 |
|
BLAKE2b-256 | 9aa096ca953df086216343926736a6b18d01d085e19f3560acc3e3fdd03afd7e |