diff --git a/CHANGELOG.md b/CHANGELOG.md index d9695300a0..24bc7a2e18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Our versioning strategy is as follows: ### 🐛 Bug Fixes * `[sitecore-jss-nextjs]` Addressed an issue where the x-middleware-rewrite header caused redirects to fail during execution on Netlify. ([#1915](https://github.com/Sitecore/jss/pull/1915)) +* `[sitecore-jss-nextjs]` Fixed incorrect behavior of redirects on Netlify service. This fix does not resolve issues related to multilingual redirects. ([#1919](https://github.com/Sitecore/jss/pull/1919)) ## 22.1.2 diff --git a/packages/sitecore-jss-nextjs/src/middleware/redirects-middleware.ts b/packages/sitecore-jss-nextjs/src/middleware/redirects-middleware.ts index 1839f6fa5b..86ad0d16dc 100644 --- a/packages/sitecore-jss-nextjs/src/middleware/redirects-middleware.ts +++ b/packages/sitecore-jss-nextjs/src/middleware/redirects-middleware.ts @@ -275,7 +275,6 @@ export class RedirectsMiddleware extends MiddlewareBase { statusText: string ): NextResponse { const redirect = NextResponse.redirect(url, { - ...(res || {}), status, statusText, headers: res?.headers,