title: Angular doesn't send cookies on CORS
body: <p>I have an <code>App Engine</code> server hosting an AngularJS application that makes <code>CORS</code> requests to some <code>Cloud Endpoints</code> APIs on another <code>App Engine</code> server. As per the <a href="https://docs.angularjs.org/api/ng/service/$http" rel="nofollow">$http service documentation</a> I have enabled it to send credentials in cross-domain requests by settinga default header:</p>
  
  <pre><code>$httpProvider.defaults.withCredentials = true;
  </code></pre>
  
  <p>The front-end server has an associated custom domain with SSL support, and makes requests via <code>HTTPS</code> (so that both the ends are basically <code>HTTPS</code>).
  My goal is sending an authentication cookie to the backend in order to manage resource access authorization, but for some reason this cookie never gets sent.
  I do see the cookie in the request when the two servers are running locally (frontend: <a href="http://localhost:8081" rel="nofollow">http://localhost:8081</a>, backend: <a href="http://localhost:8080" rel="nofollow">http://localhost:8080</a>), but not when they're deployed.</p>
  
  <p>What am I missing there?</p>
  
  <p><a href="https://docs.angularjs.org/api/ng/service/$http" rel="nofollow">angular http Documetation i follwed </a></p>