title: Missing headers in response for jQuery request with CORS
body: <p>I'm trying to execute CORS request with jquery buy I'm getting strange behaviour. When I use curl to execute the request everything is working fine. But when I use jQuery the things goes horribly wrong. In the "Network" tab in my browser I can inspect the request and the response from the back-end there everything is correct <a href="https://i.stack.imgur.com/5oYYU.png" rel="noreferrer"><img src="https://i.stack.imgur.com/5oYYU.png" alt="enter image description here"></a> but although I have <strong>Access-Control-Expose-Headers: Set-Cookie</strong> header I get null when I try to print it out using console.log(response.getResponseHeader("Set-Cookie"));  When I try to print out the response headers of my ajax request in the console with <strong>console.log(response.getAllResponseHeaders())</strong> I get only these 3 headers:</p>
  
  <pre><code>Pragma: no-cache
  Cache-Control: no-cache, no-store, max-age=0, must-revalidate
  Expires: 0
  </code></pre>
  
  <p>The code that I'm using to execute requests is:</p>
  
  <pre><code>$.ajax({
      method: "POST",
      url: "http://localhost:8808/storage/login",
      data: {
          username: email,
          password: password,
      },
      success: function(data, textStatus, response){
          console.log(response.getAllResponseHeaders());
          console.log(response.getResponseHeader("Set-Cookie"));
          this.setState({showAlert: true, alertMessage: "You are logged in.", alertType: "success"});
      }.bind(this),
      error: function (xhr, status, err) {
          this.setState({showAlert: true, alertMessage: "Wrong email or password", alertType: "danger"});
      }.bind(this)
  });
  </code></pre>