From 9b21aeb07577e9e78dadaf48aac5a6c3d136c368 Mon Sep 17 00:00:00 2001 From: Daniel Brook-Roberge Date: Fri, 29 Jan 2016 11:53:50 -0800 Subject: [PATCH] Don't redirect if the testing mode is active. --- flask_sslify.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flask_sslify.py b/flask_sslify.py index 979dc72..d0e1c5d 100644 --- a/flask_sslify.py +++ b/flask_sslify.py @@ -42,7 +42,7 @@ class SSLify(object): def skip(self): """Checks the skip list.""" # Should we skip? - if self.skip_list and isinstance(self.skip_list, list): + if self.skip_list and isinstance(self.skip_list, list): for skip in self.skip_list: if request.path.startswith('/{0}'.format(skip)): return True @@ -54,6 +54,7 @@ class SSLify(object): criteria = [ request.is_secure, current_app.debug, + current_app.testing, request.headers.get('X-Forwarded-Proto', 'http') == 'https' ]