title: Setting cookies for subdomain
body: <p>i'm making a web app in a restful way.
  For my client side i'm using angularJs, the same is hosted at - lets say - 
  <a href="https://domain.com" rel="nofollow">https://domain.com</a></p>
  
  <p>My backend is built on spring boot and i call all the resources from a subdomain - lets say - 
  <a href="https://xyz.domain.com" rel="nofollow">https://xyz.domain.com</a></p>
  
  <p>Now when a user logs in , the backend sends an http only cookie to the client. 
  I can see the cookie in response header but its not being set in the browsers cookie.</p>
  
  <p>After a bit of research, i have tried sending cookie with domain = .domain.com 
  but that didnt work either. </p>
  
  <p>Is there a way i can set cookie coming from xyz.domain.com for my client side at domain.com </p>
  
  <p>(Note - i'm not using www.domain.com ) </p>
  
  <p>Any help or clue would be great. </p>
  
  <p>Thank you for going through my question. </p>