title: AngularJS + Ngingx CORS
body: <p>Im trying to have the following setup:</p>
  
  <p><strong>API</strong></p>
  
  <p>api.domain.com</p>
  
  <p><strong>APP</strong></p>
  
  <p>domain.com</p>
  
  <p>I've setup 2 different nginx configs, one for each of the 2 urls.
  Both of them work when doing regular GET requests in the browser (api.domain.com/test) but it all falls apart when doing a $resource call from angularjs (POST). This returns a </p>
  
  <pre><code>     not allowed by Access-Control-Allow-Origin.
  </code></pre>
  
  <p>I've been going on this for a while now and been playing around with different config files.
  I'm currently using the following file but i have no idea if this should work.</p>
  
  <p><a href="http://paste.laravel.com/h6U" rel="nofollow">http://paste.laravel.com/h6U</a></p>
  
  <p>Any help would be greatly appreciated </p>