title: Is it better to use CORS or nginx proxy_pass for a RESTful client-server app?
body: <p>I have a client-server app where the server is a Ruby on rails app that renders JSON and understands RESTful requests. It's served by nginx+passenger and it's address is api.whatever.com.</p>
  
  <p>The client is an angular js application that consumes these services (whatever.com). It is served by a second nginx server and it's address is whatever.com.</p>
  
  <p>I can either use CORS for cross subdomain ajax calls or configure the client' nginx to proxy_pass requests to the rails application.</p>
  
  <p>Which one is better in terms of performance and less trouble for developers and server admins?</p>