From 7ce099c3d092cf0dcb106260396a86ba75627560 Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Mon, 17 Feb 2020 21:47:36 -0800 Subject: [PATCH] Remove deprecated `request.is_xhr` This was removed from `werkzeug` `1.0.0`. Details: * https://github.com/pallets/werkzeug/issues/1077 * https://github.com/pallets/werkzeug/issues/1714 (search for `is_xhr`) Fix #144. --- flask_debugtoolbar/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flask_debugtoolbar/__init__.py b/flask_debugtoolbar/__init__.py index 80c896d..0dc05d9 100644 --- a/flask_debugtoolbar/__init__.py +++ b/flask_debugtoolbar/__init__.py @@ -178,8 +178,7 @@ def process_response(self, response): # Intercept http redirect codes and display an html page with a # link to the target. if current_app.config['DEBUG_TB_INTERCEPT_REDIRECTS']: - if (response.status_code in self._redirect_codes and - not real_request.is_xhr): + if response.status_code in self._redirect_codes: redirect_to = response.location redirect_code = response.status_code if redirect_to: