desusaiteja opened a new pull request, #66690: URL: https://github.com/apache/airflow/pull/66690
When Airflow UI is reached through a proxy such as Gitpod, Codespaces, ngrok, or a reverse proxy, the auth-failure redirect can preserve the API server's absolute URL in the `next` parameter instead of the browser-visible URL. After login, that can send users to the wrong origin such as `http://localhost:29091`. This change makes the UI send a same-origin relative `next` target using only path, query, and hash. That keeps the browser on the current origin after login while still returning users to the same page they were on. Validation: - added regression tests for path-only, path + query, and path + query + hash redirects - added coverage for proxied subpaths such as `/team-a/...` - confirmed the generated `next` target does not include an `http://` or `https://` origin prefix closes: #46533 --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Codex (GPT-5.4) Generated-by: Codex (GPT-5.4) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
