title: Cookies are not set from Cross domain AJAX request
body: <p>I am loading a javascript on my page <a href="http://vista.local/" rel="nofollow">http://vista.local/</a>. The script sends a POST request to a webservice <a href="http://api.vista.local/sessions" rel="nofollow">http://api.vista.local/sessions</a> which sets the cookies is set in the response </p>
  
  <pre><code>Accept-Ranges:bytes
  Access-Control-Allow-Credentials:true
  Access-Control-Allow-Headers:Accept, Origin, Content-Type, Cookie
  Access-Control-Allow-Methods:GET,POST
  Access-Control-Allow-Origin:http://vista.local
  Age:0
  Cache-Control:public, max-age=1
  Connection:keep-alive
  Content-Length:36
  Content-Type:application/json
  Date:Sun, 23 Aug 2015 06:00:45 GMT
  Server:Apache-Coyote/1.1
  Set-Cookie:vista-session=c07c4d25-5c6e-47a3-9bbc-60f7d122075a;Domain=.vista.local;Path=/;HttpOnly
  Set-Cookie:vista-loggedin=true;Domain=.vista.local;Path=/;
  Set-Cookie:vista-user-email=vista1839@yahoo.com;Domain=.vista.local;Path=/;HttpOnly
  Set-Cookie:vista-session-dummy=c07c4d25-5c6e-47a3-9bbc-60f7d122075a;Version=1
  Set-Cookie:vista-secured-session=08239195-e95e-4f42-adeb-5d9c745ca853;Domain=.vista.local;Path=/;Secure;HttpOnly
  Vary:Accept-Encoding,User-Agent
  X-UA:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36
  </code></pre>
  
  <p>I tried different types of cookies.. HttpOnly, non-HttpOnly without domain, with domain. Nothing works.</p>
  
  <p>My JS/JQuery code to request </p>
  
  <pre><code>function login(formdata) {
      $.ajax({
          url : api.sessions,
          method : "POST",
          data : JSON.stringify(formdata),
          dataType : 'text',
          contentType: 'application/json',
          success : function(data) {
              console.log("yeeeii")
          },
          error: function(jqXHR, textStatus, errorThrown) {
              $(".error").html(textStatus);
          }
      });
  }
  </code></pre>