fall back to host

This commit is contained in:
Elio Bischof
2025-02-12 18:14:01 +01:00
parent 533e8a2360
commit 0e52f989e9

View File

@@ -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}`,