Mark Rebuck created AIRFLOW-5429:
------------------------------------
Summary: Links to configurations, version does not respect
base_url with subpath
Key: AIRFLOW-5429
URL: https://issues.apache.org/jira/browse/AIRFLOW-5429
Project: Apache Airflow
Issue Type: Bug
Components: ui
Affects Versions: 2.0.0
Reporter: Mark Rebuck
We deploy airflow instances to hosts where the base_url is of the form
[http://foo.bar.com/x] or [http://foo.bar.com/y] Most the UI works correctly,
but following the "Admin -> Configurations" menu item, or "About -> Version"
both result in 404's. They take the user to [http://foo.bar.com/configuration]
or [http://foo.bar.com/version] instead of including the "/x" or "/y" parts of
the base_url, e.g. [http://foo.bar.com/x/configuration] (which works).
I'm not a Flask expert, but I suspect the issue might be one of:
1.
[https://github.com/apache/airflow/blob/f497d1d5aad9d88d6c1cd1dfa28546e7a8c5cb5f/airflow/www/app.py#L132]
and
[https://github.com/apache/airflow/blob/f497d1d5aad9d88d6c1cd1dfa28546e7a8c5cb5f/airflow/www/app.py#L155]
, where the href parameter is hardcoded with a leading "/", or...
2. [https://github.com/apache/airflow/blob/master/airflow/www/views.py#L1980]
, where the call to render_template() does not supply the root parameter.
Other functions, e.g. 'code' action, do a root=request.args.get('root') as a
parameter to render_template().
I apologize for not providing a PR with a suggested fix. I can't currently
build the Docker image from source in order to test/verify.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)