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] Fix redirects when matching URLs and search params present #2050

Merged
merged 3 commits into from
Mar 3, 2025

Conversation

art-alexeyenko
Copy link
Contributor

@art-alexeyenko art-alexeyenko commented Feb 28, 2025

Description / Motivation

Fixes two main issues:

  • Cleans up x-sc-rewrite header correctly
  • Ensures redirect works with simple urls (/page-1 -> /page-2) when incoming URL has query string.

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)

@art-alexeyenko art-alexeyenko requested a review from a team February 28, 2025 22:41
@art-alexeyenko art-alexeyenko merged commit 6a3c56b into dev Mar 3, 2025
1 check passed
@art-alexeyenko art-alexeyenko deleted the bugfix/JSS-5263-redirects-qs branch March 3, 2025 16:42
@@ -281,4 +281,58 @@ describe('MiddlewareBase', () => {
expect(middleware['getSite'](req, res).hostName).to.equal('yyy.net');
expect(siteResolver.getByHost).to.be.calledWith('yyy.net');
});
xdescribe('rewrite', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

this test is being skipped

addy-pathania pushed a commit that referenced this pull request Mar 3, 2025
…ams present (#2050)

* [sitecore-jss-nextjs] Fix redirects when matching URLs and search params present
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.

3 participants