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.29.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 606c8f471d0922598b248d8b44a9c0ad889dc642d84a99fb77fee62fe5dcb574 |
|
MD5 | 512645d6a46be90e2360f2dc9f7ec48b |
|
BLAKE2b-256 | e35379f0f3b9c19a9a61010e328c93c5b957fdb2b2e746abdf0475192d6b2ad6 |
Close
Hashes for django_simple_ip_restrict-1.0.29-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a04035710a4acb08354fcbe8ccc63ac7bd9a09a1b29aefae83938b1827e935f |
|
MD5 | 65570e585a7f3f500a11c1f67f1ea8e3 |
|
BLAKE2b-256 | 3e42a120fc50d924113c76c6af374dc89b3295fca779bc73ad2541f1863ae7b9 |