Skip to content

Commit

Permalink
Add always redirectory to https
Browse files Browse the repository at this point in the history
  • Loading branch information
crazyguitar committed Mar 4, 2016
1 parent 85cf5f1 commit 18725f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@
import os

from flask import Flask, send_from_directory
from flask_sslify import SSLify

DIR = os.path.dirname(os.path.realpath(__file__))
ROOT = os.path.join(DIR, 'docs', '_build', 'html')

app = Flask(__name__)
if 'DYNO' in os.environ:
sslify = SSLify(app)

@app.route('/<path:path>')
def static_proxy(path):
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ snowballstemmer==1.2.1
Sphinx==1.3.5
sphinx-rtd-theme==0.1.9
Werkzeug==0.11.4
Flask-SSLify==0.1.5
wheel==0.24.0

0 comments on commit 18725f8

Please sign in to comment.