Closed jphyqr closed 9 months ago
the middleware rewrite strips off your search params.
return NextResponse.rewrite( new URL(/app${path === "/" ? "" : path}?${url.searchParams}, req.url), );
return NextResponse.rewrite( new URL(
, req.url), );
i added this so that I can have search params in my pages.tsx files.
dunno if any other issues with this, but something to look for
I am facing this issue too, it works after adding this ?${url.searchParams} to the URL
?${url.searchParams}
Good point! Just added this line which should fix this: https://github.com/vercel/platforms/blob/main/middleware.ts#L27-L29
the middleware rewrite strips off your search params.
return NextResponse.rewrite( new URL(
/app${path === "/" ? "" : path}?${url.searchParams}, req.url), );
i added this so that I can have search params in my pages.tsx files.
dunno if any other issues with this, but something to look for