Answer the question
In order to leave comments, you need to log in
Cookie exchange between subdomains?
Can a api.example.com
cookie be sent to dev.example.com
? That is, is it possible to exchange cookies between subdomains?
Answer the question
In order to leave comments, you need to log in
no
But you can make a cookie in a domain
and the cookie will be visible in both domains
Cookies can only be set on a domain and its subdomains.
Accordingly, globally there are exactly 2 options to make a cross-domain cookie:
a) on the domain, example.com
put a handler that hangs the cookie on the desired domain dev.example.com
or .example.com
b) on the domain, dev.example.com
put the handler that hangs the cookie on the same domain.
You can do it in php, you can (although not securely) do it through js (for example , liba ) - but in any case, you need access to either the target domain or the top-level domain.
Can api.example.com send a Cookie to dev.example.com? That is, is it possible to exchange cookies between subdomains?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question