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.31.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 333eb54a260758c9a9e771797225e0eb0bdca4820a45d8f5a5140c3e693c05db |
|
MD5 | 96ec8eb004ed424c5b21542031777056 |
|
BLAKE2b-256 | db669fe3274ddbe30d7d90eaa09781cd26f4d70a6749bee4741d2a0a9eea0fdf |
Close
Hashes for django_simple_ip_restrict-1.0.31-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | c227aa3c3a60b4b8049b68f3c64d661667e66572fab8986e7d206c3db34db570 |
|
MD5 | 160017b1852593540e15db2e12ac84fb |
|
BLAKE2b-256 | 8b4ebe4d577a75feb7d8cc1ae3891ed6ab2b4e7c3c4949a40ccb0516fcd07fde |