Skip to content

Commit 6f79f0b

Browse files
committed
Merge pull request #289 from fusionbox/master
Do not intercept redirects for ajax requests
2 parents 6ad6d3a + 46f5ef3 commit 6f79f0b

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
@@ -119,7 +119,7 @@ def process_response(self, request, response):
119119
if not toolbar or request.is_ajax():
120120
return response
121121
if isinstance(response, HttpResponseRedirect):
122-
if not toolbar.config['INTERCEPT_REDIRECTS']:
122+
if not toolbar.config['INTERCEPT_REDIRECTS'] or request.is_ajax():
123123
return response
124124
redirect_to = response.get('Location', None)
125125
if redirect_to:

0 commit comments

Comments
 (0)