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]: Redirects with double and more parameters has been fixed for netlify #SXA-7554 #1935

Closed sc-ruslanmatkovskyi closed 1 month ago

sc-ruslanmatkovskyi commented 1 month ago

Description / Motivation

This PR includes a fix for an issue with Netlify, where URL parameters are being sorted by alphabet. This causes redirects with two or more query parameters to not match the expected patterns. To resolve this, a new method has been added that generates all possible permutations of the query parameters based on their arrangement. This ensures that the redirect logic can correctly handle unordered query strings, allowing for proper matching with URL patterns, regardless of how parameters are ordered in the incoming requests.

Testing Details

Types of changes