title: Set or Get cookies for different domains (not on a subdomain)
body: <p>I have a file server, or more of a personal CDN, which I want to protect against unauthorized access. Assuming that this personal CDN is accessible through <code>https://www.personalCDN.com</code>, and the requests to this file server come from the following domains: </p>
  
  <pre><code>1- https://www.Application1.com
  2- https://www.Application2.com
  3- https://www.WebSite1.com
  </code></pre>
  
  <p>In case I want the authentication layer to be cookie-based in a way that, when the user logs into any of these three domains, a cookie for <code>https://www.personalCDN.com</code> would be added to browser, and then it would be used by the main file server, how can I handle this situation in <code>ASP.Net Core 2.x</code>? I've read that, writing cookies for other domains is not allowed in JavaScript, does it apply to Asp.Net as well? </p>