Redirect relative?


I'm using the Forward Authentication feature where backend is one of my container.

I've setup it as such:

  • traefik.frontend.auth.forward=http://<container>/auth.php

When the authentication failed, the auth page sends a header("Location: /login.php");

The end user receive instead a redirect with url: http://<container>/login.php.

Is seems that traefik transform a relative redirect to an absolute redirect.

Is it possible to keep it relative?

Best Regards,


I've found my answer here:


header("Location: https://". $_SERVER['HTTP_X_FORWARDED_HOST' ] ."/login.php");

it does the job.