Skip to content

Commit

Permalink
Don't redirect if the testing mode is active.
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brook-Roberge committed Jan 29, 2016
1 parent a5576e9 commit 9b21aeb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask_sslify.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def hsts_header(self):
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
Expand All @@ -54,6 +54,7 @@ def redirect_to_ssl(self):
criteria = [
request.is_secure,
current_app.debug,
current_app.testing,
request.headers.get('X-Forwarded-Proto', 'http') == 'https'
]

Expand Down

0 comments on commit 9b21aeb

Please sign in to comment.