I am initializing a WKWebView with a script that injects cookies. The script has the form:
document.cookie = 'mycookie=2bxxx962-b525-4afb-88de-ae4f12ecaxxxx;domain=stage.site.com;path=/;expires=Fri, 10 Apr 2020 21:32:50 GMT';
But, after I load a url and inspect the cookies, the cookie has a
Does someone know why the dot is being added? This is causing problems downstream as I now have duplicate cookies.
becuse your domain is has a subdomain. .site.com is default use browser isnt check subdomain if is begin with “.” it’s should useful for you https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie