Sitecore / jss

Software development kit for JavaScript developers building web applications with Sitecore Experience Platform
https://jss.sitecore.com
Apache License 2.0
263 stars 275 forks source link

[sitecore-jss-nextjs] fix for Redirects related to x-middleware-next Header #SXA-6564 #1899

Closed sc-ruslanmatkovskyi closed 2 months ago

sc-ruslanmatkovskyi commented 3 months ago

Description / Motivation

The issue was caused by the x-middleware-next header in Next.js, which prevented the flow from being interrupted properly. As a result, redirects did not function correctly in certain cases. This fix ensures that the flow is correctly interrupted, allowing redirects to work as expected.

Testing Details

Types of changes