mirror of
https://github.com/not-kennethreitz/flask-sslify.git
synced 2026-06-05 06:56:15 +00:00
Don't redirect if the testing mode is active.
This commit is contained in:
+2
-1
@@ -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'
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user