-
-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different settings for different URL's #244
Comments
Currently, it isn't possible. How would you tell the difference between web and mobile logins? Do you mean mobile browser or mobile via a native mobile app? |
Mainly different endpoints |
I see. So, depending on the endpoint, they would have a different configuration. How do you propose that we make the settings configurable based on the endpoint? |
I think it might be something like this DEFNDER_CONFIG = {
"default": {
"DEFENDER_DISABLE_IP": env.bool("DJANGO_DEFEBDER_DISABLE_IP", True),
},
"special_endpoint": {
"DEFENDER_DISABLE_IP": env.bool("DJANGO_SPECIAL_ENDPOINT_DEFEBDER_DISABLE_IP", True),
},
} default is the old to be backward compatible/global config in code, we would do, settings.DEFENDER_CONFIG.get('speical_config_name', settings.DEFENDER_CONIG['default']) the |
Ok, that seems like a big change because we would have to move all settings from the top level to a new DEFENDER_CONFIG setting and support both going forward, and deprecate the old way. Before we do something this dramatic, is this a feature other people think is useful for them? |
@kencochrane I don't know, so let's keep the issue open if anyone thought it's useful, he would react to the messages : ) |
Would it be possible to have different configs for different auth methods?
for example, for a web login I would like to enable IP blocking
for mobile I don't and so
What do you think? If you are OK with it I would be happy to implement it.
The text was updated successfully, but these errors were encountered: