Merged in fix/current-content-page-searchparams (pull request #186)

fix: uri was never added to searchParams for current content page resulting in 404

Approved-by: Michael Zetterberg
This commit is contained in:
Simon.Emanuelsson
2024-05-20 11:19:07 +00:00
committed by Michael Zetterberg

View File

@@ -54,6 +54,7 @@ export const middleware: NextMiddleware = async (request) => {
}
if (isCurrent) {
searchParams.set("uri", pathNameWithoutLang)
return NextResponse.rewrite(
new URL(
`/${lang}/current-content-page?${searchParams.toString()}`,