title: Proxied http response fails to set cookie
body: <p>I'm developing a web application and testing it using Google Chrome 60.0.3112.113.</p>
  
  <p>To simplify the development process I use a node.js development web server with <a href="https://github.com/chimurai/http-proxy-middleware" rel="nofollow noreferrer">http-proxy-middleware</a> to proxy my API request to the backend.</p>
  
  <p>Now when I send a HTTP POST request using <a href="https://github.com/mzabriskie/axios" rel="nofollow noreferrer">axios</a> to one of the API endpoints to create a session in my backend, I get back slightly altered responses headers (copied from DevTools):</p>
  
  Direct response
  
  <pre><code>HTTP/1.1 200 OK
  Content-Length: 122
  Content-Type: application/json
  Set-Cookie: sessionid={4621f755-37da-41da-bdbd-9a6ce0ee02b7}; Max-Age=31536000; Version=1
  </code></pre>
  
  Proxied response
  
  <pre><code>HTTP/1.1 200 OK
  X-Powered-By: Express
  connection: close
  content-length: 122
  content-type: application/json
  set-cookie: sessionid={4621f755-37da-41da-bdbd-9a6ce0ee02b7}; Max-Age=31536000; Version=1
  Date: Thu, 07 Sep 2017 11:06:43 GMT
  </code></pre>
  
  <p>The problem is that chrome doesn't set the cookie specified in the proxied response (DevTools->Application->Storage->Cookies stays empty), however the direct response sets the cookie as expected.</p>
  
  <p>Cookies are shown correctly in DevTools->Network-><em>My Request</em>->Cookies.
  Both versions (direct and proxied) are being accessed via <code>http://localhost:[8080 / 3000]</code></p>
  
  <p>Could the lowercase <code>set-cookie</code> header be ignored in chrome?
  Or could the other headers interfere with setting of the cookie?</p>
  
  <p>Btw: Works fine in Safari 10.1.2 (12603.3.8)</p>