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.28.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae1fa825cec07ca0dacb573a0271873c41f9b29d302832575185fe13e080b710 |
|
MD5 | 8b3a52063749e06964fb5f696523e015 |
|
BLAKE2b-256 | a16751b26dd56b462bbc9a45f145ed1a44c4d21d32b1d2f83479d6f1226aebf6 |
Close
Hashes for django_simple_ip_restrict-1.0.28-py3.8.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | d32858e966a5e174589e95d31de270840717fc907a6971f47b0147039dc36172 |
|
MD5 | f62dbb947f1feaa708160be3364ee8ab |
|
BLAKE2b-256 | dc67ba61eb7c67af7ee25098074358a286acde42fd0d6136e5340a69db50af16 |