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

Allow to configure guest_token cookie options #3621

Merged
merged 1 commit into from
May 14, 2020

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented May 13, 2020

Description

The guest_token cookie is currently always only allowed for the current domain (including subdomain).

If you want to use the cookie on a static frontend communicating with your Solidus API you want to share the cookie with all subdomains (ie. www.example.com and api.example.com) in order for the cart session to still work.

With this configuration you can do that.

Checklist:

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have updated Guides and README accordingly to this change (if needed)
  • I have added tests to cover this change (if needed)
  • I have attached screenshots to this PR for visual changes (if needed)

@tvdeyen tvdeyen force-pushed the allow-guest-token-cookie-domain branch from 80851e4 to a1ae7c7 Compare May 13, 2020 11:25
The guest_token cookie is currently always only allowed for the current domain (including subdomain).

If you want to use the cookie on a static frontend communicating with your Solidus API you want to share the cookie with all subdomains (ie. www.example.com and api.example.com) in order for the cart session to still work.

With this configuration you can do that.
@tvdeyen tvdeyen force-pushed the allow-guest-token-cookie-domain branch from a1ae7c7 to 8caef37 Compare May 13, 2020 11:25
@tvdeyen tvdeyen requested a review from a team May 13, 2020 11:27
@aldesantis
Copy link
Member

aldesantis commented May 13, 2020

Looking good @tvdeyen, thanks! I have re-run the tests because the failure seems random and not related.

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Thanks @tvdeyen, I just left one question.

Copy link
Member

@gmacdougall gmacdougall left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks Thomas!

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

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

Thanks!

@kennyadsl kennyadsl added changelog:solidus_core Changes to the solidus_core gem and removed Needs Core Team Review labels May 14, 2020
@kennyadsl kennyadsl merged commit b8296bd into solidusio:master May 14, 2020
@tvdeyen tvdeyen deleted the allow-guest-token-cookie-domain branch July 23, 2020 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:solidus_core Changes to the solidus_core gem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants