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
Close
Hashes for django_simple_ip_restrict-1.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3158c43af98a4b11ca712c7ae59d1f40db149d0b9526a6679baa8e35fbe4175 |
|
MD5 | 3b2d1d0ff94fdea8bb462d5e5d07eaa4 |
|
BLAKE2b-256 | 4e9c7986deb3ccd29b0d7495a85a62bf268c468405f0d413c8099576c2ce1cde |