From 9b8725a66e96836d776192a123fc9580e9f5dcce Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Fri, 27 Jun 2014 07:25:37 +0200 Subject: Forcing SSL with Flask-SSLify on Heroku. --- pyaggr3g470r/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pyaggr3g470r') diff --git a/pyaggr3g470r/__init__.py b/pyaggr3g470r/__init__.py index 36f95bc0..a1ab31bf 100644 --- a/pyaggr3g470r/__init__.py +++ b/pyaggr3g470r/__init__.py @@ -25,6 +25,10 @@ app.config['RECAPTCHA_USE_SSL'] = True app.config['RECAPTCHA_PUBLIC_KEY'] = conf.RECAPTCHA_PUBLIC_KEY app.config['RECAPTCHA_PRIVATE_KEY'] = conf.RECAPTCHA_PRIVATE_KEY +if conf.ON_HEROKU: + from flask_sslify import SSLify + sslify = SSLify(app) + ALLOWED_EXTENSIONS = set(['xml', 'opml', 'json']) def allowed_file(filename): -- cgit