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.39.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b93cc343b954b5ac12b5242b02193c25e55e19e71279492b279ab11b66aa13 |
|
MD5 | 99f5f3cd64e8d31d094355e547e77fb9 |
|
BLAKE2b-256 | 055fc71c692f5a0dbf1bdc56aeafe1c0c840cfaa2b1e46940c2391b32edbfa9e |
Close
Hashes for django_simple_ip_restrict-1.0.39-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3ddf0f46bd79990af3debb15843d7923831c924532d1340f236eb0541322e65 |
|
MD5 | 5d9724950ec68f6bd0f8944883b82602 |
|
BLAKE2b-256 | 03754db750cc1734a4541a7e7fef03aeef8f7be1cb92e76dc1a8e3f4e15c6e1b |