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] Referrer is not captured by Personalize middleware #1542

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

illiakovalenko
Copy link
Contributor

@illiakovalenko illiakovalenko commented Jun 28, 2023

Description / Motivation

Personalize middleware doesn't access a real referrer value (from headers), instead, it provided a default "about:client" value from the request

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)

@illiakovalenko illiakovalenko requested a review from a team June 28, 2023 11:59
Copy link
Contributor

@addy-pathania addy-pathania 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. 👍🏼
Check one comment.

Comment on lines 83 to 85
referer: referrer,
},
referrer,
referrer: 'about:client',
Copy link
Contributor

Choose a reason for hiding this comment

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

Should there be a test case to check both scenarios?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sc-addypathania Good point! I changed the existing test case and now it's verifying when the referer is empty, the opposite case when the referer exists is covered in the rest of the unit tests. Looks good?

Copy link
Contributor

@addy-pathania addy-pathania left a comment

Choose a reason for hiding this comment

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

Looks great now 👍🏼

@illiakovalenko illiakovalenko merged commit e9cd911 into dev Jun 28, 2023
@illiakovalenko illiakovalenko deleted the bugfix/578681 branch June 28, 2023 14:05
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