I've got 2 servers on the same domain but different ports. 80: Apache for html 12345: Some application that delivers JSON or binary data, depending on the request url.
It seems like I can't do simple requests due to the same origin policy. Is there any workaround? Is it maybe possible to forward some types of port 80 urls to port 12345 urls in a way that does not go against the same origin policy?
EDIT: Thanks for the replies but I should probably add that the server that would have to enable CORS is the one on port 12345 which is not apache/nodejs/php. It's a custom application that listens to this port and replies with requested content so there is no simple CORS for me to enable.