[ 
https://issues.apache.org/jira/browse/AIRFLOW-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17004737#comment-17004737
 ] 

ASF subversion and git services commented on AIRFLOW-6345:
----------------------------------------------------------

Commit ec1dd580b35aeef3decca418a1e55138a499bcfa in airflow's branch 
refs/heads/v1-10-test from Daniel Cohen
[ https://gitbox.apache.org/repos/asf?p=airflow.git;h=ec1dd58 ]

[AIRFLOW-6345] Ensure arguments to ProxyFix are integers (#6901)

(cherry picked from commit be58f173481c7651e50aeed485cd762a5b3c5629)


> 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
>             Fix For: 1.10.8
>
>
> 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)

Reply via email to