title: Play 2.0.1 and setting Access-Control-Allow-Origin
body: <p>I have a Play 2.0.1 application that I want to call using Javascript hosted on other domains. My Javascript call is failing with:</p>
  
  <pre><code>Origin http://mydomain.com is not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>I have found a number of examples of how to set the correct HTTP header in Play 1, but have not found anything for Play 2.0.1.  After reading the documentation (http://www.playframework.org/documentation/2.0.2/JavaResponse) I've tried the following just to get things working:</p>
  
  <pre><code>public static Result myJsonWebService() {
    ...
    response().setHeader("Access-Control-Allow-Origin", "*");
    return ok(toJson(jsonObject));
  }
  </code></pre>
  
  <p>but my JS web service call is still failing.</p>
  
  <p>What do I need to do to get this working?</p>