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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_simple_ip_restrict-1.0.35.tar.gz.
File metadata
- Download URL: django_simple_ip_restrict-1.0.35.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a26dadcc72c0e8c01572b6f27bba5bcdf478c261337cb1eebb25e28e31da88
|
|
| MD5 |
d8b095e36e2f28051e9ef8dc48cac49c
|
|
| BLAKE2b-256 |
cebf96fdd9f008fa86ec6f1ebf8051c4f678c6390b58d11a9490505e5fc35400
|
File details
Details for the file django_simple_ip_restrict-1.0.35-py3.8.egg.
File metadata
- Download URL: django_simple_ip_restrict-1.0.35-py3.8.egg
- Upload date:
- Size: 4.3 kB
- Tags: Egg
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5180d8c765535d5e28893ea4d6740ad16bea87147ac5edd5199cf413440faeb4
|
|
| MD5 |
a05f3a76c7e0b8594cbad9261fc4333b
|
|
| BLAKE2b-256 |
f959de69b261e92d08e1f72e6cf07d0151ca327409188dcfcbd0e50e37efd0d0
|