Skip to content

Commit

Permalink
[AIRFLOW-4934] Fix ProxyFix due to Werkzeug upgrade (apache#5563)
Browse files Browse the repository at this point in the history
  • Loading branch information
nritholtz authored and wayne.morris committed Jul 29, 2019
1 parent 7b4b47a commit 4efc8a7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion airflow/www/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ def create_app(config=None, session=None, testing=False, app_name="Airflow"):
global app, appbuilder
app = Flask(__name__)
if conf.getboolean('webserver', 'ENABLE_PROXY_FIX'):
app.wsgi_app = ProxyFix(app.wsgi_app)
app.wsgi_app = ProxyFix(
app.wsgi_app,
num_proxies=None,
x_for=1,
x_proto=1,
x_host=1,
x_port=1,
x_prefix=1
)
app.secret_key = conf.get('webserver', 'SECRET_KEY')

app.config.from_pyfile(settings.WEBSERVER_CONFIG, silent=True)
Expand Down

0 comments on commit 4efc8a7

Please sign in to comment.