title: Firefox Does not allow CORS request even when the server returns the appropriate response header
body: <p>My app makes an ajax request using CORS, which works in Chrome but not in Firefox. I followed the <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS" rel="nofollow noreferrer">MDN CORS instructions</a>, but it does not work.</p>
  <p>Here's an elided view of my code:</p>
  <pre><code>var href = ...
  var request = new XMLHttpRequest();
  request.open('GET', href, true);
  request.setRequestHeader(&quot;Accept&quot;, &quot;application/json&quot;);
  request.onload = ...
  request.onerror = ...
  try {
    request.send();
  } catch (e) {
    console.log(e.message);
  }
  </code></pre>
  <p>This results in a NS_ERROR_DOM_BAD_URI exception, with message &quot;Access to restricted URI denied&quot; and code = 1012.</p>
  <p>The server is responding with <code>Access-Control-Allow-Origin: http://localhost:13000</code> which I verified when making the request in Chrome. I'd like to look at the response headers in FF, but the web developer console only shows me the GET requests for the javascript files, and I see no way to examine the headers of the ajax request and response. It would also be nice to verify the pre-flight request, which should result from setting a custom header, but I can't see how to get access to that with the debugger.</p>