After reading this Share cookie between subdomain and domain, I still don't completely understand. My task is share the cookies between the domain and its subdomain. They both can install them:
If sub1.domain.com installs them first, then they should be accessible in both sub1.domain.com and domain.com
And if domain.com installs them first, then they should be accessible in both sub1.domain.com and domain.com
By installing first I mean, they get installed once a new user comes to either the main domain or subdomain.
So if I install them as Set-Cookie: name=value; domain=example.com
on any of those domains, will they be shared?