I have two domains:
test.local
editor.test.local
User signed up on domain test.local and browser get cookie with domain .test.local Now I want to use this cookie in AJAX call from editor.test.local to test.local, but no cookies are send. Is there any easy workaround to send cookies from subdomain, or should i use iframes and postmessages? Thanks!
Cookies can be shared across subdomains depending on how they are “scoped.”
To scope a cookie to use across
foo.example.comandbar.example.comyou set it to.example.com(with just the dot in front of the domain).Aside from this mechanism, cookies are not supposed to “leak” across domains, which are defined by the tuple of a page’s
domain, protocol and port.