Skip to content

Commit

Permalink
Merge pull request not-kennethreitz#36 from DanielBrookRoberge/master
Browse files Browse the repository at this point in the history
Disable redirects when testing mode is enabled.
  • Loading branch information
kennethreitz committed Feb 4, 2016
2 parents a5576e9 + 37317a6 commit 8afefa5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion flask_sslify.py
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
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -12,7 +12,7 @@

setup(
name='Flask-SSLify',
version='0.1.5',
version='0.1.6',
url='https://github.com/kennethreitz/flask-sslify',
license='BSD',
author='Kenneth Reitz',
Expand Down

0 comments on commit 8afefa5

Please sign in to comment.