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.38.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2083d831574ddd33235067119f9cd88505a3ead40423974a9e9afd2770a106bd |
|
MD5 | 59f6a5e2ee9ddbf3bef842f294a18eda |
|
BLAKE2b-256 | 953cff4684f80892371b9d61ad1db683b06bdde46c2aec9b4c21cc70e05b6d9a |
Close
Hashes for django_simple_ip_restrict-1.0.38-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a6a464b6b3365f9e4b3292b757780d480c814a7c235776fb18568e8c831dd18 |
|
MD5 | 9ba0472aae61084cb280c5703d8b3675 |
|
BLAKE2b-256 | 25cfc4dbbcf26a1e24b6084d996a44619264ec9e6ea4eb7e524711e1dff7c9a0 |