Merge pull request #290 from m0sth8/patch-1

Add support for http based instances in middleware
This commit is contained in:
Max Peintner
2024-11-26 09:34:14 +01:00
committed by GitHub

View File

@@ -23,7 +23,7 @@ export function middleware(request: NextRequest) {
// this is a workaround for the next.js server not forwarding the host header
requestHeaders.set(
"x-zitadel-instance-host",
`${INSTANCE}`.replace("https://", ""),
`${INSTANCE}`.replace(/^https?:\/\//, ""),
);
const responseHeaders = new Headers();