I'm trying to do a simple http GET request to the rotten tomatoes API in my AngularJS application, but when I run it I get this in my browser console:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://api.rottentomatoes.com/api/public/v1.0/movies/770672122.json?apikey=[myApiKey]. This can be fixed by moving the resource to the same domain or enabling CORS.
Note: the '[myApiKey]' is replaced with my actual key...
I've tried this with Chrome and Firefox, and while I know there are some parameters that you can attach when starting up Chrome to disable this, normal users won't know how to do this, so from a browser compatibility that option just isn't going to work for me. Also I've tried running my application from my Desktop as well as from a local instance of Tomcat.
So I see that this can be fixed by enabling CORS. Now how do I do this? Obviously I can't touch the Rotten Tomatoes servers so this has to be done from my side - the client.