Permalink
Browse files

force SSL when debug is off

  • Loading branch information...
zackdever committed Nov 27, 2012
1 parent cb417b0 commit 985c3f048ba05f94e3b8ff7832f9442307391685
Showing with 4 additions and 2 deletions.
  1. +3 −1 location/__init__.py
  2. +1 −1 requirements.txt
View
@@ -1,14 +1,16 @@
import os
from flask import Flask
+from flask_sslify import SSLify
from location import db
from location.api import api
from location.auth import auth, setup_auth
from location.ui import ui
-# create a Flask app
+# create a Flask app, force SSL when debug is False
app = Flask(__name__, static_folder='./ui/static')
+SSLify(app, subdomains=True)
app.config.from_pyfile('config.py')
# set the below env var to your config file path to load custom configs
View
@@ -1,7 +1,7 @@
Flask==0.9
Flask-Login==0.1.3
+Flask-SSLify==0.1.4
Jinja2==2.6
Werkzeug==0.8.3
py-bcrypt==0.2
pymongo==2.3
-wsgiref==0.1.2

0 comments on commit 985c3f0

Please sign in to comment.