Comments (7)
Great! thank you very much! didn't mean to put this as a bug, but github didn't give me another option. Thank you for you quick reply..
from django-maintenance-mode.
@davidgomezcol as documentation says:
# list of urls that will not be affected by the maintenance-mode # urls will be used to compile regular expressions objects MAINTENANCE_MODE_IGNORE_URLS = ()
So you just need to "prepare" your url for regex usage:
MAINTENANCE_MODE_IGNORE_URLS = ('192\.168\.0\.0\/32',)
from django-maintenance-mode.
Don't worry!
from django-maintenance-mode.
Hello!.. I'm adding my ip addresses like this.. but it doesn't seem to work.. i'm still having 503's after this.. and there's a bunch of them.. i'm just sharing you a little.. there's about of 200 ip addresses that i need to add there..
MAINTENANCE_MODE_IGNORE_IP_ADDRESSES = ( '31\.186\.232\.0\/24', '34\.90\.192\.162', '37\.230\.97\.9', '63\.251\.76\.0\/25',)
I tested both ways and is not working for me... --- > MAINTENANCE_MODE_IGNORE_URLS
from django-maintenance-mode.
Sorry, but there is some confusion here:
MAINTENANCE_MODE_IGNORE_URLS
check a match in the url path, excluding the domain name.MAINTENANCE_MODE_IGNORE_IP_ADDRESSES
check a match in the client ip returned byMAINTENANCE_MODE_GET_CLIENT_IP_ADDRESS
(see the README).
So, in your case you should add ip-addresses to MAINTENANCE_MODE_IGNORE_IP_ADDRESSES
(without escaping them) and write your own custom MAINTENANCE_MODE_GET_CLIENT_IP_ADDRESS
function.
from django-maintenance-mode.
I'm using django-ipware to get the user ip address.. the problem is that i have is with this kind of ip addresses 23.64.0.0/14 that could be a bunch of them, so if django-ipware grabs the ip address for example 23.67.255.255 that would be in the list of ip address from 23.64.0.0/14. I thought that probably this could have an internal function that handles that kind of situation, where can be a added this way.. i have a large list of ip addresses that i need to add like that..
from django-maintenance-mode.
You should write your own function wrapping ipware.
from django-maintenance-mode.
Related Issues (20)
- Add new setting to expire the user session HOT 4
- ModuleNotFoundError: 'utils.middleware.maintenance' While running testcases HOT 1
- Add banner for informate user hours and date of the maintenance HOT 3
- Reason and Service Timeline HOT 1
- Redirect on /maintenance-mode/on HOT 3
- state file content value is not 0|1 HOT 2
- Disable emailing 503 errors to admins while maintenance mode is enabled HOT 12
- Banner for all templates to warn users when maintenance will be HOT 1
- 404 Not Found Error When SCRIPT_NAME Defined HOT 10
- FileNotFoundError with default settings HOT 1
- IGNORE_IP not working HOT 6
- CommandError: Unable to write state file at: maintenance_mode_state.txt HOT 1
- Working fine on dev box but not functioning on test box with virtual directory HOT 11
- force_maintenance_mode_off doesn't work for AJAX requests HOT 1
- Problem with ipware version HOT 1
- Unable to use with s3 storage HOT 4
- Add maintenance mode toggler in the admin site HOT 1
- MAINTENANCE_MODE_STATE_FILE_PATH setting bug HOT 2
- Drop `Python < 3.8` and `Django < 2.2` support.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-maintenance-mode.