[FIX] http: keep debug mode in rediction
The parameter forward_debug is used to keep the debug mode during redirection. Previous code was setting the debug to None which is ignored by werkzeug, making the option useless. Closes #12107
This commit is contained in:
+1
-1
@@ -142,7 +142,7 @@ def local_redirect(path, query=None, keep_hash=False, forward_debug=True, code=3
|
||||
if not query:
|
||||
query = {}
|
||||
if forward_debug and request and request.debug:
|
||||
query['debug'] = None
|
||||
query['debug'] = ''
|
||||
if query:
|
||||
url += '?' + werkzeug.url_encode(query)
|
||||
if keep_hash:
|
||||
|
||||
Reference in New Issue
Block a user