We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cf0fff0 + 8447fce commit 8aa0eeaCopy full SHA for 8aa0eea
apps/trust/src/middleware.ts
@@ -1,9 +1,9 @@
1
import { NextRequest, NextResponse } from "next/server";
2
3
const DOMAIN_TO_ORG_ID_MAP = {
4
- "fba6-145-40-151-14.ngrok-free.app": "org_681e8e3282ad3e9eb78bc58c",
5
"security.trycomp.ai": "org_681e8e3282ad3e9eb78bc58c",
6
"trust.trycomp.ai": null,
+ "dad6-145-40-151-14.ngrok-free.app": "org_681e8e3282ad3e9eb78bc58c",
7
};
8
9
export async function middleware(request: NextRequest) {
@@ -23,6 +23,7 @@ export async function middleware(request: NextRequest) {
23
if (url.pathname.startsWith(`/${orgIdForCustomDomain}`)) {
24
return NextResponse.next();
25
}
26
+
27
url.pathname = `/${orgIdForCustomDomain}${url.pathname}`;
28
return NextResponse.rewrite(url);
29
0 commit comments