-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Toggle DEBUG_TB_INTERCEPT_REDIRECTS
from the toolbar
#267
Comments
In general this isn't possible. Config cannot be changed after the application starts, because there's no way to ensure that change is propagated to other workers, depending on how the server is being used. The built-in Flask dev server uses threads, so it would work there, but it can also be configured for processes, and most other servers use processes. |
Ah, interesting technical constraint, that's fair. I was definitely only thinking of the basic local dev case. It's obviously not the end of the world using the config option :) |
I was just poking around the debug toolbar - could it not be achieved using the See example I've thrown together here: main...samuelhwilliams:flask-debugtoolbar:toggle-redirect-intercept-from-panel Some questions around how it would interact (or whether it would replace) the I'd be open to cleaning it up, adding tests and raising a PR if it's something you're open to (provided you can share some thoughts on what to do with the env var). |
At the moment, the debug toolbar provides an interstitial page upon redirects by default. This can be configured on/off explicitly with the
DEBUG_TB_INTERCEPT_REDIRECTS
setting.I'd find it really useful if this could be toggled directly from the toolbar on the page. :)
The text was updated successfully, but these errors were encountered: