Vercel middleware bug (#293)

* Remove rewrite

* Revert change to middleware
This commit is contained in:
Luke Vella 2022-08-18 16:11:19 +01:00 committed by GitHub
parent c51514d36b
commit 9940be1607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

View file

@ -39,11 +39,7 @@ export function middleware({ headers, cookies, nextUrl }: NextRequest) {
}
}
// 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);
return NextResponse.next();
}
export const config = {