Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

Fix middleware (#291)

Luke Vellac51514d36b85
diff --git a/src/middleware.ts b/src/middleware.ts
index a6d719a3d..70649dce5 100644
--- a/src/middleware.ts
+++ b/src/middleware.ts
@@ -39,7 +39,11 @@ export function middleware({ headers, cookies, nextUrl }: NextRequest) {
}
}
- return NextResponse.next();
+ // TODO (Luke Vella) [2022-08-18]: There seems to be a bug on vercel that
+ // results in the component being remounted when doing NextResponse.next() rather
+ // than loading the correct component.
+ // return NextResponse.next();
+ return NextResponse.rewrite(newUrl);
}
export const config = {