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:
@@ -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()}`,
|
||||
|
||||
Reference in New Issue
Block a user