title: Hosting static content on different domain from webservices, how to avoid cross-domain?
body: <p>We've recently been working on a fairly modern web app and are ready to being deploying it for alpha/beta and getting some real-world experience with it.</p>
  
  <p>We have ASP.Net based web services (Web Api) and a JavaScript front-end which is 100% client-side MVC using backbone.</p>
  
  <p>We have purchased our domain name, and for the sake of this question our deployment looks like this:</p>
  
  <p>webservices.mydomain.com (Webservices)</p>
  
  <p>mydomain.com (JavaScript front-end)</p>
  
  <p>If the JavaScript attempts to talk to the webservices on the sub-domain we blow up with cross domain issues, I've played around with CORS but am not satisfied with the cross browser support so I'm counting this out as an option.</p>
  
  <p>On our development PC's we have used an IIS reverse proxy to forward all requests to mydomain.com/webservices to webservices.mydomain.com - Which solves all our problems as the browser thinks everything is on the same domain.</p>
  
  <p>So my question is, in a public deployment, how is this issue most commonly solved? Is a reverse proxy the right way to do it? If so is there any hosted services that offer a reverse proxy for this situation? Are there better ways of deploying this?</p>
  
  <p>I want to use CloudFront CDN as all our servers/services are hosted with Amazon, I'm really struggling to find info on if a CDN can support this type of setup though.</p>
  
  <p>Thanks</p>