Skip to content

Commit 46f5ef3

Browse files
committed
Do not intercept redirects for ajax requests
1 parent 7b610e9 commit 46f5ef3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

debug_toolbar/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def process_response(self, request, response):
115115
if not toolbar:
116116
return response
117117
if isinstance(response, HttpResponseRedirect):
118-
if not toolbar.config['INTERCEPT_REDIRECTS']:
118+
if not toolbar.config['INTERCEPT_REDIRECTS'] or request.is_ajax():
119119
return response
120120
redirect_to = response.get('Location', None)
121121
if redirect_to:

0 commit comments

Comments
 (0)