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.30.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0af21a6b905b35010a37e3c6b4b6a6b0da91fd132480e0bd8e237f10dfb6051 |
|
MD5 | cc736e21c2d9aa7c926d0389930aecc2 |
|
BLAKE2b-256 | 443d0647d38e42d4ea4ee1cfa0152bfe85778ffc8d8fccdea3d429a7713843ef |
Close
Hashes for django_simple_ip_restrict-1.0.30-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3e911d38add9c57365ec605b175b21411b457e209620128d8adc12c20d943d0 |
|
MD5 | d0ac887bdb9e9328bd97e93c574efb8e |
|
BLAKE2b-256 | e02ff290c811153823663e2e1a067cf17e62cc1147a7f2278f841c3e0c52b13b |