1

I set a cookie by making a request from example.io to api.example.io/set_cookie. The cookie looks like so:

jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIyMjdlNTU5MC0zODJkLTExZWEtOTA0ZC05NzljOTIyNmZiZmQiLCJpYXQiOjE1NzkxNTc3MDkzNDR9.Sz-_8M4M1te82Z-PuG9H8MUNlLGPUGdGLfQ_-YuL9xA; Domain=example.io; Path=/; Expires=Fri, 15 Jan 2021 06:55:09 GMT; HttpOnly

I specify the domain to be example.io. So, I expect the browser to send this cookie to any subsequent requests to api.example.io and example.io. However, this does not happen. I think I'm following the advice in Share cookie between subdomain and domain.

quantdaddy
  • 1,028
  • 1
  • 14
  • 26
  • How do you know it's not being saved in Chrome? It is httpOnly so it won't be available to Javascript in a web page. – jfriend00 Jan 16 '20 at 07:27
  • 1
    I do not see any cookies in the storage section of application tab of developers tool in chrome. Regardless, I do not care if javascript reads it. All I care about is the cookie should be sent to subsequent request to api.example.io – quantdaddy Jan 16 '20 at 07:31
  • Does this answer your question? [Cookie set on root domain not available to subdomain - what am I doing wrong?](https://stackoverflow.com/questions/63513651/cookie-set-on-root-domain-not-available-to-subdomain-what-am-i-doing-wrong) – user4157124 Nov 15 '20 at 23:54

0 Answers0