diff --git a/apps/login/src/app/login/route.ts b/apps/login/src/app/login/route.ts index fb1486efb2..a302dd7610 100644 --- a/apps/login/src/app/login/route.ts +++ b/apps/login/src/app/login/route.ts @@ -201,9 +201,8 @@ async function findValidSession( } function constructUrl(request: NextRequest, path: string) { - // TODO: remove localhost const forwardedHost = - request.headers.get("x-zitadel-forward-host") ?? "http://localhost:8080"; + request.headers.get("x-zitadel-forward-host") ?? request.headers.get("host"); const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ""; return new URL( `${basePath}${path}`,