Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

redirect to same url after set base_url #31726

Closed
1 of 2 tasks
PaleNeutron opened this issue Jun 6, 2023 · 3 comments · Fixed by #31833
Closed
1 of 2 tasks

redirect to same url after set base_url #31726

PaleNeutron opened this issue Jun 6, 2023 · 3 comments · Fixed by #31833
Assignees
Labels
area:webserver Webserver related Issues kind:bug This is a clearly a bug

Comments

@PaleNeutron
Copy link

PaleNeutron commented Jun 6, 2023

Apache Airflow version

Other Airflow 2 version (please specify below)

What happened

$ curl localhost:8080/airflow/
<!doctype html>
<html lang=en>
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to the target URL: <a href="http://localhost:8080/airflow/">http://localhost:8080/airflow/</a>. If not, click the link.

What you think should happen instead

At least not circular redirect.

How to reproduce

generate yaml:

helm template --name-template=airflow  ~/downloads/airflow > airflow.yaml

add base_url in webserver section and remove health and ready check in webserver(to keep pod alive):

    [webserver]
    enable_proxy_fix = True
    rbac = True
    base_url = http://my.domain.com/airflow/

Operating System

Ubuntu 22.04.2 LTS

Versions of Apache Airflow Providers

apache-airflow==2.5.3
apache-airflow-providers-amazon==7.3.0
apache-airflow-providers-celery==3.1.0
apache-airflow-providers-cncf-kubernetes==5.2.2
apache-airflow-providers-common-sql==1.3.4
apache-airflow-providers-docker==3.5.1
apache-airflow-providers-elasticsearch==4.4.0
apache-airflow-providers-ftp==3.3.1
apache-airflow-providers-google==8.11.0
apache-airflow-providers-grpc==3.1.0
apache-airflow-providers-hashicorp==3.3.0
apache-airflow-providers-http==4.2.0
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-microsoft-azure==5.2.1
apache-airflow-providers-mysql==4.0.2
apache-airflow-providers-odbc==3.2.1
apache-airflow-providers-postgres==5.4.0
apache-airflow-providers-redis==3.1.0
apache-airflow-providers-sendgrid==3.1.0
apache-airflow-providers-sftp==4.2.4
apache-airflow-providers-slack==7.2.0
apache-airflow-providers-snowflake==4.0.4
apache-airflow-providers-sqlite==3.3.1
apache-airflow-providers-ssh==3.5.0

Deployment

Official Apache Airflow Helm Chart

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@PaleNeutron PaleNeutron added area:core kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jun 6, 2023
@boring-cyborg
Copy link

boring-cyborg bot commented Jun 6, 2023

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@rohan472000
Copy link
Contributor

rohan472000 commented Jun 6, 2023

The circular redirect error suggests that there might be a misconfiguration in the URL redirection settings.

Also verify that the base_url parameter is set correctly in the Airflow configuration file. In your case, it should be base_url = http://my.domain.com/airflow/.

@PaleNeutron
Copy link
Author

PaleNeutron commented Jun 6, 2023

@rohan472000 I found the problem, it could be reproduced by using standalone mode and just set base_url = http://localhost:8080/airflow/ in airflow.cfg.

It works with base_url = http://localhost:8080/airflow, without the last slash.

I think it should be treated as a bug or at least emphasis it in document.

@hussein-awala hussein-awala added area:webserver Webserver related Issues and removed area:core needs-triage label for new issues that we didn't triage yet labels Jun 10, 2023
@hussein-awala hussein-awala self-assigned this Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:webserver Webserver related Issues kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants