title: Web API 2 CORS Won't Allow IP Addresses as Origins
body: <p>I have a Web API 2 application with CORS authentication enabled. Locally I'm running two sites, a SPA site and the web API, both on port 80, using different host headers. Everything works fine. However, I'm trying to test on a machine that has no domain, so I have to use IP addresses with different ports for the two sites. No matter what I do, the web API gives the good old "No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://xxx.xxx.xxx.xxx:8090" rel="nofollow">http://xxx.xxx.xxx.xxx:8090</a>' is therefore not allowed access". I have my CORS configured as follows:</p>
  
  <pre><code>var cors = new EnableCorsAttribute(
              origins: "*",
              headers: "*",
              methods: "*");
          config.EnableCors(cors);
  </code></pre>
  
  <p>Is it only possible to run web API 2 CORS when the API is on a real domain, not on an IP address? That seems like an extreme limitation.</p>
  
  <p>Not sure if it matters or not, but locally I'm running IIS 7.5, but my test machine is IIS 7. </p>
  
  <p>Any help would be greatly appreciated.</p>