Fix middleware (#291)

This commit is contained in:
Luke Vella 2022-08-18 14:44:14 +01:00 committed by GitHub
parent acb1e972ac
commit c51514d36b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 = {