from flask import Flask
from flask.ext.login import LoginManager
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__)
app.config.from_object('config')
login_manager = LoginManager()
login_manager.init_app(app)
db = SQLAlchemy(app)

from app import views, models
@@ -1,16 +1,61 @@
+from werkzeug.contrib.fixers import ProxyFix%0A
 from flask impor
@@ -62,16 +62,16 @@
 t Flask%0A
-
 from fla
@@ -203,16 +203,55 @@
 onfig')%0A
+app.wsgi_app = ProxyFix(app.wsgi_app)%0A%0A
 login_ma
@@ -323,16 +323,16 @@
 y(app)%0A%0A
-
 from app
@@ -352,8 +352,9 @@
 , models
+%0A

Add ProxyFix() middleware component to fix the HTTPS redirection issue. See !17