Skip to content

Open-source status page, incident response and uptime monitoring

😂

Thibault Le Ouay654736679848
diff --git a/apps/status-page/src/middleware.ts b/apps/status-page/src/middleware.ts
index cc4b8c524..cae14f2bb 100644
--- a/apps/status-page/src/middleware.ts
+++ b/apps/status-page/src/middleware.ts
@@ -88,8 +88,10 @@ export default async function middleware(req: NextRequest) {
// WTF is this
if (_page.customDomain === prefix && pathnames[1] === pathnames[2]) {
- const newPathname = `/${pathnames.slice(0,1).join("/")}`;
- return NextResponse.rewrite(new URL(newPathname, req.url));
+ const newPathname = `/${pathnames.slice(2).join("/")}`;
+ console.log('newPath', newPathname)
+ console.log(pathnames)
+ return NextResponse.rewrite(new URL(`${pathnames[1]}`, req.url));
}
// WTF is this