mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-23 21:07:10 +02:00
Vercel middleware bug (#293)
* Remove rewrite * Revert change to middleware
This commit is contained in:
parent
c51514d36b
commit
9940be1607
2 changed files with 1 additions and 9 deletions
|
@ -42,10 +42,6 @@ const moduleExports = {
|
||||||
source: "/",
|
source: "/",
|
||||||
destination: "/home",
|
destination: "/home",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
source: "/:urlId",
|
|
||||||
destination: "/poll?urlId=:urlId",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
source: "/p/:urlId",
|
source: "/p/:urlId",
|
||||||
destination: "/poll?urlId=:urlId",
|
destination: "/poll?urlId=:urlId",
|
||||||
|
|
|
@ -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
|
return NextResponse.next();
|
||||||
// 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 = {
|
export const config = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue