Removed completely turning off redirects stuff.

This commit is contained in:
Michael Tofias
2015-03-31 12:07:07 -05:00
parent 6431e8fbf4
commit d141f4fec9
2 changed files with 1 additions and 7 deletions
-6
View File
@@ -70,12 +70,6 @@ You can exlude a path that starts with given string by including a list called `
Or by including ``SSL_SKIPS`` in your app's config.
Turn-off Redirects Completely
------------------------------
Flask-SSLify won't run if ``DEBUG`` is ``True``, but you can also turn-off redirects completely by setting
``SSL_NO_REDIRECTS`` in your app's config which might be useful for things like testing, etc.
Install
-------
+1 -1
View File
@@ -9,7 +9,7 @@ class SSLify(object):
"""Secures your Flask App."""
def __init__(self, app, age=YEAR_IN_SECS, subdomains=False, permanent=False, skips=None):
if app is not None and not app.config.get('SSL_NO_REDIRECTS'):
if app is not None:
self.app = app
self.hsts_age = age
self.hsts_include_subdomains = subdomains or app.config.get('SSL_SUBDOMAINS')