I have a React application. Currently I am using js-cookie to manage my cookies. Right now I am facing this problem: I need the cookies to be available at domain level and not subdomain level.
Eg: my site is running under mysite.mydomain.com, then I need the cookies to be available to any site that is running under .mydomain
I read in other post that I can be achievable just setting the path to "/". SO I mad this:
Cookies.set('session', myvalue ,{path:'/'});
However it's still creating the cookie at mysite.mydomain.com
So, what else can I do? I dont want to writte the domain directly when I create the cookie due that it's not clean and also the development is under localhost and it would get a mess. So, I am looking for a clean solution
Thank you very much