From 97c3ecc37e783b5313844e8d16170bf5c1be9261 Mon Sep 17 00:00:00 2001 From: Ruslan Matkovskyi Date: Thu, 5 Sep 2024 12:10:25 +0200 Subject: [PATCH 1/2] [sitecore-jss-nextjs]: Redirects for Netlify has been fixed(instead of multilanguage) #SXA-6564 --- .../sitecore-jss-nextjs/src/middleware/redirects-middleware.ts | 1 - 1 file changed, 1 deletion(-) 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, From 70a2fc6909a293fc9260dcb2a61681850923e43e Mon Sep 17 00:00:00 2001 From: Ruslan Matkovskyi Date: Thu, 5 Sep 2024 12:16:29 +0200 Subject: [PATCH 2/2] CHANGELOG has been changed --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) 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