1

I'm trying to make an AJAX call from my localhost to a https URL.

Of course I get "XMLHttpRequest cannot load https://blablabla.com/example.json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9000' is therefore not allowed access. "

Is that even possible without touching the server?

Daniel Viedma
  • 129
  • 1
  • 9
  • Nope, it doesn't matter if it's https either, any ajax request where protocols, domains or ports doesn't match is not allowed, unless the server sends JSONP or allows CORS. – adeneo Sep 25 '14 at 19:36
  • Without touching blablabla.com, yes, but you'll have to use your localhost server or another 3rd party server as a proxy between your web page and the target server. Send the request to the "proxy" server that then sends a request and gets the response from the target server and returns it to your script. – Kevin B Sep 25 '14 at 19:38
  • I see. Thanks guys. http://stackoverflow.com/questions/3076414/ways-to-circumvent-the-same-origin-policy is a good compilation of different techniques (y) – Daniel Viedma Sep 25 '14 at 19:56

0 Answers0