Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

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 ashb committed Jul 12, 2019
1 parent d388449 commit ccfe23d
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 ccfe23d

Please sign in to comment.