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

fix: pass cookies to intelligent search requests #2740

Merged
merged 4 commits into from
Mar 21, 2025

Conversation

matheusps
Copy link
Contributor

@matheusps matheusps commented Mar 21, 2025

What's the purpose of this pull request?

The cookie information (especially vtex_segment) is relevant for intelligent search, this PR forwards them on the request headers.

How to test it?

  1. Make a search
  2. Check the request Headers.Cookie on the Search request
  3. You should see several cookies sent

Preview: https://starter-git-test-segment-vtex.vercel.app/

@matheusps matheusps added the bug Something isn't working label Mar 21, 2025
@matheusps matheusps self-assigned this Mar 21, 2025
@matheusps matheusps requested a review from a team as a code owner March 21, 2025 14:12
@matheusps matheusps requested review from renatamottam and lucasfp13 and removed request for a team March 21, 2025 14:12
Copy link

codesandbox-ci bot commented Mar 21, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

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

I left a small suggestion to keep the pattern using the withCookie function instead of creating a new one.

Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

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

LGTM! would be good to test in the starter/some production env.

@matheusps
Copy link
Contributor Author

All good @eduardoformiga. Preview here: https://starter-git-test-segment-vtex.vercel.app/

@matheusps matheusps merged commit fd4ba80 into main Mar 21, 2025
10 checks passed
@matheusps matheusps deleted the fix/intelligent-search-headers branch March 21, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants