I have been using Ripple Emulator for some time, but after reinstalling it is no longer using the XHR CORS proxy when requesting cross domain resources.
I have tried the suggested test code in: Internet not accessible from ripple emulator
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("GET", "http://www.bing.com", true);
xmlhttp.send();
But the request is not passed through the Ripple XHR Proxy.
Request:
GET / HTTP/1.1
Host: www.bing.com
Connection: keep-alive
Origin: http://localhost:4400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.97 Safari/537.36
Accept: */*
Referer: http://localhost:4400/
Accept-Encoding: gzip, deflate, sdch
Accept-Language: da,en;q=0.8,en-US;q=0.6
Error:
XMLHttpRequest cannot load http://www.bing.com/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:4400' is therefore not allowed access.
Cross domain proxy is set to: local
It seems to start the proxy:
INFO: Server instance running on: http://localhost:4400
INFO: CORS XHR proxy service on: http://localhost:4400/ripple/xhr_proxy
INFO: JSONP XHR proxy service on: http://localhost:4400/ripple/jsonp_xhr_proxy
Cordova 3.0 Project detected...
INFO: Could not find cordova as a local module. Expecting to find it installed globally.
INFO: Using Browser User Agent (String)
refreshing project (platform: android) ...
... done.
Any suggestions on what i am doing wrong here?