Skip to content

Add toggle button for DEBUG_TB_INTERCEPT_REDIRECTS to debug toolbar UI #299

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sathvik-palley
Copy link

Summary

This PR introduces a new toggle button in the Flask Debug Toolbar to dynamically enable or disable the DEBUG_TB_INTERCEPT_REDIRECTS setting.

Changes:

  • Adds backend route: /_debug_toolbar/views/toggle_redirect_intercept to flip the config
  • Injects current config state into toolbar.py → template context
  • Adds a UI toggle button with real-time label (Intercept: ON/OFF) and color state

Motivation:

This improves developer productivity by allowing redirect interception control without restarting the server or modifying config files manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants