title: CORS preflight not returning
body: <p>I'm working on implementing CORS so that my Ember app can talk to an API on another server. There are two requests that I need to send: an authentication request via POST and then a GET request to one of the API endpoints.</p>
  
  <p>Both requests kick off preflight requests. The authentication preflight request runs fine. Then when I run a request to the API, the preflight request hangs. Chrome shows the status and type as "Pending" and the request never finishes.</p>
  
  <p>This is the authentication code. I'm using jQuery 1.10.2 here.</p>
  
  <pre><code>  $.ajax({
      type: 'POST',
      url: 'https://blahblahblah.edu/AstraDev/Logon.ashx',
      data: "{username: '', password: ''}",
      contentType: 'text/json',
  
      xhrFields: {
        withCredentials: false 
      },
  
      headers: {
      },
  
      success: function(response) {
        console.log(response);
      },
  
      error: function(response) {
        console.log(response);
      }
    });
  </code></pre>
  
  <p>And the very similar code for the API GET request</p>
  
  <pre><code>  $.ajax({
      type: 'GET',
      url: 'https://blahblahblah.edu/AstraDev/~api/query/room',
      data: {fields: "Id"},
      contentType: 'application/json; charset=utf-8',
      xhrFields: {
        withCredentials: true 
      },
      headers: {
      },
      success: function(response) {
        console.log(response)
      },
      error: function(response) {
        console.log(response)
      }
    });
  </code></pre>
  
  <p>If I change the GET's content type to something that doesn't preflight (like "text/plain"), the request fails. But if I do anything that preflights, the preflight hangs.</p>
  
  <p>And here's the relevant server configuration. I'm working with IIS 7.5.</p>
  
  <pre><code>&lt;httpProtocol&gt;
       &lt;customHeaders&gt;
         &lt;add name="Access-Control-Allow-Origin" value="http://localhost:8888" /&gt;
         &lt;add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS" /&gt;
         &lt;add name="Access-Control-Allow-Headers" value="Content-Type" /&gt;
         &lt;add name="Access-Control-Allow-Credentials" value="true" /&gt;
      &lt;/customHeaders&gt;
  &lt;/httpProtocol&gt;
  </code></pre>
  
  <p>CORS is pretty new to me. So maybe I'm missing something obvious. Any ideas? Thanks.</p>