Skip to content

Logout broken if base_url has a suffix in 3.0.0rc4 #49534

@dheerajturaga

Description

@dheerajturaga

Apache Airflow version

3.0.0

If "Other Airflow 2 version" selected, which one?

No response

What happened?

In airflow 3.0.0rc4, my api.base_url is https://mycompany.com/airflow . All the FastAPI calls have the /airflow/ prefix set correctly. However, the logout calls /api/v2/auth/logout directly without the /airflow prefix. This causes my nginx to error out. ( this screenshot is from my scratch airflow dev env where I can see the issue )

Image

my nginx settings

    location /airflow {
            proxy_buffers 16 4k;
            proxy_buffer_size 2k;
            proxy_set_header host $host;
            proxy_set_header x-real-ip $remote_addr;
            proxy_set_header x-forwarded-host $host:$server_port;
            proxy_set_header x-forwarded-server $host;
            proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;
            proxy_set_header x-forwarded-proto $scheme;

            proxy_pass http://airflow-apiserver:8080;
            proxy_read_timeout 90;

            proxy_redirect http://airflow-apiserver:8080 https://_;
    }

What you think should happen instead?

the GET should hit /airflow/api/v2/auth/logout

How to reproduce

you should be able to observer this in the logs with just the airflow defaults. You just need

airflow api-server

let it spin the db and airflow.cfg

Operating System

Ubuntu

Versions of Apache Airflow Providers

No response

Deployment

Docker-Compose

Deployment details

No response

Anything else?

cc: @ashb @Dev-iL

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

area:APIAirflow's REST/HTTP APIarea:corekind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions