PhoneGap application not working on Google Ripple

后端 未结 2 442
一整个雨季
一整个雨季 2020-12-19 03:29

I\'m developing a phoneGap application. When I test my application in the browser there is no problem. Everythings works well. But when I am try it in ripple, my javascript

相关标签:
2条回答
  • 2020-12-19 03:53

    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).

    0 讨论(0)
  • 2020-12-19 04:03

    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.

    0 讨论(0)
提交回复
热议问题