From 19a8ef087c91838bdcda5b4178fd3d80f2e9d783 Mon Sep 17 00:00:00 2001 From: chang-ning Date: Sat, 16 Jul 2016 19:34:56 +0800 Subject: [PATCH] Enable https redirection --- app.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app.py b/app.py index b1d967b4..22a05185 100644 --- a/app.py +++ b/app.py @@ -10,8 +10,8 @@ ROOT = os.path.join(DIR, 'docs', '_build', 'html') app = Flask(__name__) -#if 'DYNO' in os.environ: -# sslify = SSLify(app) +if 'DYNO' in os.environ: + sslify = SSLify(app) @app.route('/') def static_proxy(path): @@ -23,9 +23,5 @@ def index_redirection(): """Redirecting index file""" return send_from_directory(ROOT, 'index.html') -@app.route('/.well-known/acme-challenge/39LkboWlzrvSn4bGSC-vx5Ea4FqKipU5QYcLKAn1hSM') -def letsencrypt(): - return "39LkboWlzrvSn4bGSC-vx5Ea4FqKipU5QYcLKAn1hSM.1MQ2tN97oDMCS6VnIiDMXAjUQwpiEoyNT2mUiGLhR7o" - if __name__ == "__main__": app.run(debug=True)