You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Noël BARDELOT (Jira)" <ji...@apache.org> on 2021/04/06 15:21:00 UTC
[jira] [Commented] (AIRFLOW-3806) Redirects use absolute URLs (and
ignore base_url)
[ https://issues.apache.org/jira/browse/AIRFLOW-3806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17315653#comment-17315653 ]
Noël BARDELOT commented on AIRFLOW-3806:
----------------------------------------
Adding the variable environnement :
FORWARDED_ALLOW_IPS: "*"
fixes the issue for us. See GUnicorn "forwarded_allow_ips" options (which this variable manages). The GUnicorn library by default does not recognize the X-Forwarded-* headers for IP other than localhost (thus the reverse proxy configuring those headers is not sufficiant).
> Redirects use absolute URLs (and ignore base_url)
> -------------------------------------------------
>
> Key: AIRFLOW-3806
> URL: https://issues.apache.org/jira/browse/AIRFLOW-3806
> Project: Apache Airflow
> Issue Type: Bug
> Components: webserver
> Affects Versions: 1.10.2
> Reporter: Stanislaw Pitucha
> Priority: Major
>
> I'm having an issue deploying airflow behind a load balancer where the user's connection is terminated using https, but then forwarded to airflow using http.
> For some reason the redirect from path "/" uses the current domain and forced http port. This seems to both:
> * ignore the base_url
> * use the full domain where only a relative location would be enough
> I see there's AIRFLOW-571 open to address the similar problem, but it seems like a very specific workaround rather than a fix for sending the wrong redirect in the first place.
> HTTP 302 allows relative redirect, so for example "/" -> "/admin/" should work just fine without the domain name or the schema. If the absolute path is desired, it should use "base_url" as defined in the config file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)