searchspring / snap

Snap is Searchspring's latest front end integration SDK
https://searchspring.github.io/snap/
MIT License
8 stars 0 forks source link

Subdomain Cookies #1076

Closed korgon closed 2 weeks ago

korgon commented 1 month ago

We need to ensure that certain Snap created cookies are set with the root domain (by using a leading period) so that they can be accessed by all subdomains.

The ssUserId, ssShopperId and ssSessionIdNamespace cookies should be subdomain capable. Additionally, the cookies utility may need to be modified to support setting a specific domain.

const cookieDomain = '.' + window.location.hostname.replace(/^www\./, '');

For example, domain = .searchspring.com