From 7f53b6c6c23192112e00b8fc84e3349b3f384d78 Mon Sep 17 00:00:00 2001 From: Eragon Date: Mon, 15 May 2023 13:04:06 +0200 Subject: [PATCH] debug: Fix debugToolbar redirect catch by disabling it. The debug toolbar catch redirects by default but it breaks redirection to specific anchor in topics and programs. `/forum/discussion/2/fin/rtnldj#30` redirect is broken with the catch redirect. But redirections to `/forum/discussion/2/fin/rtnldj` are fine. Disabling this feature is enough for it to work. Feel free to re-enable it yourself, but be aware that it will break parts of the application. --- config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.py b/config.py index c0a3692..7a53337 100644 --- a/config.py +++ b/config.py @@ -43,6 +43,9 @@ class FlaskApplicationSettings(object): SESSION_COOKIE_HTTPONLY = True # Do not attach cookies to cross-origin requests SESSION_COOKIE_SAMESITE = "Lax" + + # This is needed to fix redirects after posting a message on the forum + DEBUG_TB_INTERCEPT_REDIRECTS = False #--- # v5 configuration