Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sitecore-jss-nextjs]: Redirects with double and more parameters has been fixed for netlify #SXA-7554 #1935

Merged
merged 7 commits into from
Oct 8, 2024

Conversation

sc-ruslanmatkovskyi
Copy link
Collaborator

@sc-ruslanmatkovskyi sc-ruslanmatkovskyi commented Sep 26, 2024

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

  • Unit Test Added
  • Manual Test/Other (Please elaborate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Copy link
Contributor

@yavorsk yavorsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :) see few comments

Copy link
Contributor

@yavorsk yavorsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sc-ruslanmatkovskyi sc-ruslanmatkovskyi force-pushed the bugfix/SXA-7554-redirects-double-parameters branch from d750dd5 to b7ec703 Compare October 8, 2024 09:30
@yavorsk yavorsk merged commit b16b40c into dev Oct 8, 2024
1 check passed
@yavorsk yavorsk deleted the bugfix/SXA-7554-redirects-double-parameters branch October 8, 2024 09:51
art-alexeyenko pushed a commit that referenced this pull request Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants