0

I am currently running Airflow within a docker compose, and it is accessible at http://localhost:8081. However, whenever I access this URL, I am automatically redirected to http://localhost:8081/login/?next=http%3A%2F%2Flocalhost%3A8081%2Fhome. This redirection is defined as the page to go after login, and it takes me to http://localhost:8081/home.

I want to change the default redirect URL to a different page after login. Is there a way to achieve this by modifying the configuration files like airflow.cfg or webserver_config.py? Any guidance on the specific configuration changes needed to set up a new default redirect URL would be greatly appreciated. Thank you!

mkUltra
  • 2,828
  • 1
  • 22
  • 47
  • maybe [AIRFLOW__WEBSERVER__BASE_URL](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#base-url)? – RNHTTR Jul 31 '23 at 22:04
  • Unfortunately, but this solution isn't helpful for my issue. It only changes the base URL. What I actually need is to update the default `next` parameter. – mkUltra Aug 01 '23 at 06:20

1 Answers1

1

when you trying to go to http://localhost:8081 you are routing to homepage of the webserver. because you don't have access yet (need to login) then airflow redirect you to login page with next=home page (page you came from).

if you where trying to go to another url (like jobs) then the next would be to the jobs page.

so, what you are asking here is to change the home page because the redirect its an infra of how login process works.

I don't know exactly the use of your access homepage but you can make a bookmark to the page you need and airflow would redirect you to it after login

ozs
  • 3,051
  • 1
  • 10
  • 19