title: Cookies in Set-Cookie are being ignored by browser
body: <p>I do have a problem with setting cookies. I'm running a small application on Azure Functions and a static webpage as frontend, and on the login request my function properly returns a cookie in the response. Here is the whole set of response headers coming from my Azure function.</p>
  <pre><code>HTTP/1.1 200 OK
  Date: Sun, 11 Oct 2020 20:40:16 GMT
  Content-Type: application/json; charset=utf-8
  Server: Kestrel
  Content-Length: 180
  Set-Cookie: RefreshToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJVc2VyTmFtZSI6IlNvc3NlbmJpbmRlciIsImV4cCI6IjYzNzM4MDQ2NTE3MTM3NjE4NCJ9.CCv3a41iPut4eC9jK2eqAzOLP5tWLjMlRgduSkUpS40; expires=Mon, 11 Oct 2021 20:40:17 GMT; path=/; samesite=lax
  Set-Cookie: Test=Val; path=/
  Access-Control-Expose-Headers: Set-Cookie
  </code></pre>
  <p>As you can see, I included my proper token, as well as just a small test cookie, just to verify whether it would even work with a very simple cookie. Hint, it doesn't.</p>
  <p>Here is my request:</p>
  <p><a href="https://i.stack.imgur.com/ca912.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ca912.png" alt="enter image description here" /></a></p>
  <p>Sadly, whatever I try, chrome and e.g. firefox completely ignore my cookies. I didn't yet manage to have a single cookie set, no matter what I try.</p>
  <p>I tried it on localhost as well as a *.web.core.windows.net static website now, but I just can't get it to work.</p>
  <p>I think my backend is not the culprit, as the response headers seem to be set properly. But something just isn't quite right. I have read up on a lot of threads now mentioning what should be set and what not, I've probably tried them all now. Whether it is the secure flag, the samesite flag, whatever.</p>
  <p>What am I missing here?</p>
  <p>EDIT: I added a minimal reproducible example at <a href="http://www.filedropper.com/cookieproblem" rel="noreferrer">http://www.filedropper.com/cookieproblem</a></p>
  <p>To run:</p>
  <ol>
  <li><p>Navigate to the &quot;CookieProblem&quot; folder containing the CookieProblem.csproj. Open up cmd and run it with &quot;func start&quot; (requires Azure Functions CLI tool)</p>
  </li>
  <li><p>Now, run the BlazorApp1 in VS. Open the page and keep dev tools open. On load, it should make a request to the locally running function called &quot;Run&quot; in the network tab.</p>
  </li>
  <li><p>It should now also not set a cookie for you.</p>
  </li>
  </ol>