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: Properly add stencil-cli headers to internalapi requests #1164

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

jmwiese
Copy link
Contributor

@jmwiese jmwiese commented Feb 27, 2024

What?

Correctly add headers indicating this is a stencil cli request to /internalapi routes. This allows us, among other things, to properly set cookies in the browser from checkout when running on localhost.

Screenshots (if appropriate)

Before:
Screenshot 2024-02-27 at 8 05 14 AM

We can see cookies are incorrectly coming back with SameSite=None which isnt allowed here, so the cookies fail to persist in the browser and no login occurs. We can see internally that the incoming request in this case doesnt have the stencil-cli header.

After:
Screenshot 2024-02-27 at 9 07 46 AM

We can see that due to now propagating the header the cookies correctly have empty SameSite attribute and persist to the browser allowing login.

cc @bigcommerce/storefront-team

@jmwiese jmwiese changed the title Properly add stencil-cli headers to internalapi requests fix: Properly add stencil-cli headers to internalapi requests Feb 27, 2024
@jmwiese jmwiese force-pushed the STRF-11560 branch 2 times, most recently from b3c602e to dadc552 Compare February 27, 2024 16:26
@jmwiese jmwiese merged commit 24ae309 into master Feb 27, 2024
6 checks passed
Copy link
Contributor

🎉 This PR is included in version 7.3.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants