Toggle buttons fire wrong URLs when deploying in "subdirectory"
See original GitHub issueApache Airflow version: 1.10.11
Kubernetes version (if you are using kubernetes) (use kubectl version
): n.a.
Environment:
- Cloud provider or hardware configuration: on-premise
- OS (e.g. from /etc/os-release):
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
-
Kernel (e.g.
uname -a
):Linux basquiat 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
-
Install tools:
pipenv --python $(which python3.8) && pipenv install apache-airflow
-
Others:
I changed the config to have different base URL and port and use ProxyPass in Apache to forward /airflow/ to http://localhost:8012/. This subdirectory ProxyPass is critical and kind of causes the issue.
ProxyRequests off
ProxyPass /airflow/ http://localhost:8012/
ProxyHTMLURLMap http://localhost:8012 /airflow
<Location /airflow/>
ProxyPass http://localhost:8012/
ProxyPassReverse http://localhost:8012/
ProxyHTMLEnable On
ProxyHTMLURLMap / /airflow/
RequestHeader unset Accept-Encoding
</Location>
What happened:
When clicking on a toggle button in Column 2 (dags.html), the request is sent to the wrong url:
/admin/airflow/paused
instead of
/airflow/admin/airflow/paused
(Note the prefix mentioned in the proxy setup above)
What you expected to happen:
That the correct URL would be used, e.g. by using url_for
in
instead of building the URL manually as in line https://github.com/apache/airflow/blob/ba2d6408e64f219e8f53a20a5a149e3d8109db31/airflow/www/templates/airflow/dags.html#L309
How to reproduce it:
Try to deploy in a subdirectory and proxy through as described above.
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (4 by maintainers)
Thanks for opening your first issue here! Be sure to follow the issue template!
This issue has been closed because it has not received response from the issue author.