Update apps/login/src/lib/service.ts

Co-authored-by: Elio Bischof <elio@zitadel.com>
This commit is contained in:
Max Peintner
2025-03-05 08:50:07 +01:00
committed by GitHub
parent 58fad21202
commit 4e7bfb5779

View File

@@ -119,10 +119,6 @@ export function constructUrl(request: NextRequest, path: string) {
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
return new URL(
`${basePath}${path}`,
// keep this check to allow localhost for local development
forwardedHost?.startsWith("http")
? forwardedHost
: `${forwardedProto}://${forwardedHost}`,
`${forwardedProto}//${forwardedHost}`,
);
}