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

Add: subDomainPrefix as a store config #2260

Merged
merged 1 commit into from
Mar 20, 2024

Conversation

beatrizmaselli
Copy link
Contributor

What's the purpose of this pull request?

Add a config to allow replacing other subDomain prefixes for the forwardedHost to be sent.

How it works?

The client configs an array that contains the subDomain prefixes at faststore.config:

  api: {
    storeId: 'storeframework',
    workspace: 'master',
    subDomainPrefix: ['www', 'shop'],
    environment: 'vtexcommercestable',
    hideUnavailableItems: false,
    incrementAddress: true,
  }

With that in case of the host is https://www.vtexfaststore.com we should send .vtexfaststore.com
in case its https://shop.vtexfaststore.com we should send .vtexfaststore.com

How to test it?

Add the subDomainPrefix to the array list and access a domain with the current version and check the host where the checkout cookie was created.

@beatrizmaselli beatrizmaselli requested a review from a team as a code owner March 20, 2024 12:14
@beatrizmaselli beatrizmaselli requested review from emersonlaurentino and renatamottam and removed request for a team March 20, 2024 12:14
Copy link

vercel bot commented Mar 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2024 0:15am

Copy link

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
Contributor

@icazevedo icazevedo left a comment

Choose a reason for hiding this comment

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

LGTM

@beatrizmaselli beatrizmaselli merged commit 743544a into main Mar 20, 2024
7 checks passed
@beatrizmaselli beatrizmaselli deleted the subDomainPrefix-api-config branch March 20, 2024 15:30
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.

None yet

3 participants