Add PROXY_FIX config option to enable werkzeug ProxyFix

master
informatic 2018-01-26 20:07:28 +01:00
parent a3ea78f801
commit 8d0e1d1c41
2 changed files with 6 additions and 0 deletions

View File

@ -17,3 +17,5 @@ SPECIAL_DEVICES = {
}
SECRET_KEY = 'adaba'
PROXY_FIX = False

4
at.py
View File

@ -23,6 +23,10 @@ app.jinja_env.add_extension('jinja2.ext.i18n')
app.jinja_env.install_null_translations()
app.updater = None
if app.config.get('PROXY_FIX'):
from werkzeug.contrib.fixers import ProxyFix
app.wsgi_app = ProxyFix(app.wsgi_app)
auth = SpaceAuth(app)