I have two URLs:

One is the application URL = <http://domain.com/app>
One is the application API URL = <http://api.domain.com/>

How can I get the application to be able to request things from the api at a different subdomain.

I have already tried putting Access-Control-Allow-Origin: \* on both sides with no luck.

Thanks