[
https://issues.apache.org/jira/browse/AIRFLOW-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17004076#comment-17004076
]
ASF GitHub Bot commented on AIRFLOW-6345:
-----------------------------------------
potiuk commented on pull request #6901: [AIRFLOW-6345] Ensure arguments to
ProxyFix are integers
URL: https://github.com/apache/airflow/pull/6901
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> ProxyFix fails on 1.10.7 due to TypeError
> -----------------------------------------
>
> Key: AIRFLOW-6345
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6345
> Project: Apache Airflow
> Issue Type: Bug
> Components: ui
> Affects Versions: 1.10.7
> Reporter: Daniel Cohen
> Priority: Major
>
> When enabling the Werkzeug ProxyFix middleware on Airflow 1.10.7, the
> following error is thrown by the webserver on every request:
> {code}
> Traceback (most recent call last):
> File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/sync.py", line
> 135, in handle
> self.handle_request(listener, req, client, addr)
> File "/usr/local/lib/python3.6/dist-packages/gunicorn/workers/sync.py", line
> 176, in handle_request
> respiter = self.wsgi(environ, resp.start_response)
> File
> "/usr/local/lib/python3.6/dist-packages/werkzeug/middleware/dispatcher.py",
> line 66, in __call__
> return app(environ, start_response)
> File "/usr/local/lib/python3.6/dist-packages/flask/app.py", line 2463, in
> __call__
> return self.wsgi_app(environ, start_response)
> File
> "/usr/local/lib/python3.6/dist-packages/werkzeug/middleware/proxy_fix.py",
> line 200, in __call__
> self.x_proto, environ_get("HTTP_X_FORWARDED_PROTO")
> File
> "/usr/local/lib/python3.6/dist-packages/werkzeug/middleware/proxy_fix.py",
> line 166, in _get_trusted_comma
> if len(values) >= trusted:
> TypeError: '>=' not supported between instances of 'int' and 'str'
> {code}
> It appears this regression was caused by AIRFLOW-6188, which made the
> ProxyFix parameters configurable, but now returns strings instead of the
> integers expected by Werkzeug, causing the TypeError above.
> I have a PR ready, which I will attach momentarily.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)