Skip to content

Commit add4d11

Browse files
committed
Use Werkzeug ProxyFix to get the correct https url_for.
1 parent 4a166a0 commit add4d11

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

appstore/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from beeline.middleware.flask import HoneyMiddleware
1414

1515
from flask import Flask, jsonify, request
16+
from werkzeug.middleware.proxy_fix import ProxyFix
1617

1718
from .settings import config
1819

@@ -25,6 +26,7 @@
2526

2627
app = Flask(__name__)
2728
app.config.update(**config)
29+
app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)
2830
if config['HONEYCOMB_KEY']:
2931
beeline.init(writekey=config['HONEYCOMB_KEY'], dataset='rws', service_name='appstore-api')
3032
HoneyMiddleware(app, db_events=True)

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ requests==2.19.1
1919
six==1.11.0
2020
SQLAlchemy==1.2.8
2121
urllib3==1.23
22-
Werkzeug==0.14.1
22+
Werkzeug==0.16.1
2323
boto3==1.9.169
2424
PyYAML==5.1.2
2525
honeycomb-beeline==2.11.4

0 commit comments

Comments
 (0)