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.
This commit is contained in:
Eragon 2023-05-15 13:04:06 +02:00
parent 37fba5d93b
commit 7f53b6c6c2
Signed by untrusted user: Eragon
GPG Key ID: 087126EBFC725006
1 changed files with 3 additions and 0 deletions

View File

@ -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