summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2018-01-26 20:07:28 +0100
committerPiotr Dobrowolski <admin@tastycode.pl>2018-01-26 20:07:28 +0100
commit8d0e1d1c4166b0a42695582bb222cea590ad8784 (patch)
tree75e8bd82db0eda88f0841e4ee06aaed0bc0bc7b5
parenta3ea78f801a4c0e637c162b69e1f00428e86f67d (diff)
downloadcheckinator-8d0e1d1c4166b0a42695582bb222cea590ad8784.tar.gz
checkinator-8d0e1d1c4166b0a42695582bb222cea590ad8784.tar.bz2
checkinator-8d0e1d1c4166b0a42695582bb222cea590ad8784.zip
Add PROXY_FIX config option to enable werkzeug ProxyFix
-rw-r--r--at.cfg.dist2
-rw-r--r--at.py4
2 files changed, 6 insertions, 0 deletions
diff --git a/at.cfg.dist b/at.cfg.dist
index c37efdf..b2e0720 100644
--- a/at.cfg.dist
+++ b/at.cfg.dist
@@ -17,3 +17,5 @@ SPECIAL_DEVICES = {
}
SECRET_KEY = 'adaba'
+
+PROXY_FIX = False
diff --git a/at.py b/at.py
index 01347bb..8248bd7 100644
--- a/at.py
+++ b/at.py
@@ -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)