Domain And Subdomain Cookies
Sharing cookies between domains.
Domain and subdomain cookies. Let me try again today thanks sidhin s thomas jun 5 17 at 3 07. You can try copy paste code above in the console and see the result in resource panel. Modify the domain attribute of the cookie to the second level domain. If you don t setup your path auto path will be saved as from where the cookies is being saved hence it wont be accessible across any subdomain.
Rfc 2109 specifies that the domain setting on cookies must have two periods. To track my problem i ve set test cookies on both subdomaines from the webapp and the api. No path no httponly. Notice the period before the domain name this is very important.
Domain selection the origin server s fully qualified host name must domain match the domain attribute of the cookie. A forms authentication cookie is created. If a cookie is set with set cookie. The following rules apply to choosing applicable cookie values from among all the cookies the user agent has.
Domain name in the cookie defaults to the subdomain where the application resides formsauthentication setauthcookie txtusername text false. By setting the domain property of the cookie to the domain of the sub domain you instruct the browser to send the cookie to all sub domains. Walentynowicz jun 3 17 at 9 20 i literally copy pasted the keys and salts. So far so good.