You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Mathieu Poussin (Jira)" <ji...@apache.org> on 2020/01/20 09:54:00 UTC
[jira] [Issue Comment Deleted] (AIRFLOW-6549) Configuration related
to reverse proxy is loaded using wrong data type.
[ https://issues.apache.org/jira/browse/AIRFLOW-6549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mathieu Poussin updated AIRFLOW-6549:
-------------------------------------
Comment: was deleted
(was: There is already a PR to fix this : [https://github.com/apache/airflow/pull/6901/commits]
Could this be merged ?)
> Configuration related to reverse proxy is loaded using wrong data type.
> -----------------------------------------------------------------------
>
> Key: AIRFLOW-6549
> URL: https://issues.apache.org/jira/browse/AIRFLOW-6549
> Project: Apache Airflow
> Issue Type: Bug
> Components: configuration
> Affects Versions: 1.10.7
> Reporter: Mathieu Poussin
> Priority: Major
>
> The configuration management system is loading the variables related to reverse proxy fix handling with the wrong format, example with the following configuration :
>
> {code:java}
> enable_proxy_fix = True
> proxy_fix_x_for = 1
> proxy_fix_x_proto = 1
> proxy_fix_x_host = 1
> proxy_fix_x_port = 1
> proxy_fix_x_prefix = 1
> {code}
> When running the webserver, a 500 is returned with the following stacktrace:
>
> {code:java}
> TypeError: '>=' not supported between instances of 'int' and 'str'
> File "flask/app.py", line 2463, in __call__
> return self.wsgi_app(environ, start_response)
> File "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 "werkzeug/middleware/proxy_fix.py", line 166, in _get_trusted_comma
> if len(values) >= trusted:
> {code}
> When analysic local variable (thanks Sentry), I can see that trusted is equal to '1' (as string) and not 1 (as int) as it should be.
>
> This makes the usage of reverse proxy impossible.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)