| |
@@ -53,6 +53,11 @@
|
| |
if os.getenv('DEBUG') == 'true':
|
| |
app.config["DEBUG"] = True
|
| |
|
| |
+ # "Hotfix" for proxy handling on current deployment, my guess is that the proxy server is set differently than it was, but what do I know...
|
| |
+ if app.config["BEHIND_PROXY"]:
|
| |
+ from werkzeug.contrib.fixers import ProxyFix
|
| |
+ app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=1)
|
| |
+
|
| |
# setup logging
|
| |
fmt = '[%(filename)s:%(lineno)d] ' if app.debug else '%(module)-12s '
|
| |
fmt += '%(asctime)s %(levelname)-7s %(message)s'
|
| |
@@ -93,8 +98,8 @@
|
| |
|
| |
setup_logging()
|
| |
|
| |
-
|
| |
- app.logger.debug('using DBURI: %s' % app.config['SQLALCHEMY_DATABASE_URI'])
|
| |
+ if app.config['SHOW_DB_URI']:
|
| |
+ app.logger.debug('using DBURI: %s' % app.config['SQLALCHEMY_DATABASE_URI'])
|
| |
|
| |
# database
|
| |
db = SQLAlchemy(app)
|
| |
Adds Proxy handling to fix the broken openid login.
Not sure what changed between the deployments, that this is now needed out of the blue, but the issue was that the
request.url
was set tolocalhost:8081/blockerbugs
instead of the "public" URL.Also fixes the DB-uri (contains login and password) leakage to logs.
Requires fix in the ansible playbook to work on production - add
BEHIND_PROXY = True
to the config file.