You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Mauro Schilman (Jira)" <ji...@apache.org> on 2019/12/27 21:55:00 UTC

[jira] [Created] (AIRFLOW-6375) Webserver returns 500 when running Airflow behind a reverse proxy

Mauro Schilman created AIRFLOW-6375:
---------------------------------------

             Summary: Webserver returns 500 when running Airflow behind a reverse proxy
                 Key: AIRFLOW-6375
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6375
             Project: Apache Airflow
          Issue Type: Bug
          Components: webserver
    Affects Versions: 1.10.7
            Reporter: Mauro Schilman


When running with:


 
{code:java}
[webserver]
enable_proxy_fix = True{code}
 

proxy_fix_x_for is being setup/converted to str at some point causing the following TypeError:
{code:java}
[2019-12-27 19:44:59 +0000] [34] [ERROR] Error handling request /
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 135, in handle
    self.handle_request(listener, req, client, addr)
  File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 176, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/dispatcher.py", line 66, in __call__
    return app(environ, start_response)
  File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in __call__
    return self.wsgi_app(environ, start_response)
  File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 195, in __call__
    x_for = self._get_trusted_comma(self.x_for, environ_get("HTTP_X_FORWARDED_FOR"))
  File "/usr/local/lib/python3.6/site-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}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)