PhoneGap application not working on Google Ripple

时光总嘲笑我的痴心妄想 提交于 2019-11-29 09:50:47

The issue that you are likely running into is that you are using Ripple's cross-domain proxy which is turned on in settings by default.

The cross-domain-proxy has 3 settings: "remote", "local" and "disabled". In my situation I actually had to disable it, but in some cases you would be able to use "local".

Possible scenarios:

1) your local application calls a remote service somewhere on another server:

you would either use "remote" or "disabled" depending on the configuration on the remote server.

2) your local application is on "localhost" and you are making a call to another localhost accessible URL:

you would either use "local" or "disabled" depending on your cross domain settings and such.

3) you are running a local app that calls a server that is also local but in a vm or something that makes it inaccessible to a proxy on "localhost":

you need to have it set to "disabled", and make sure your api server has settings to allow cross-domain requests. Most notably you would want to set the "Access-Control-Allow-Origin" header.

I had the same issue. It was happening when I was trying to connect to my WebAPI service hosted on IISExpress.

After I changed hosting to my local IIS server, the error dissapeared and I was able to connect to my WebAPI service using Ripple. Of course, you will have to change url pointing to your service (in your case it is http://localhost:30673).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!