0

I have a PhoneGap 3.6.3 app. I'm running it locally using the phonegap cli using phonegap serve and opening the resulting IP in Chrome.

The app needs to make ajax calls to an external server. However, all http requests are being rerouted through http://<local ip>/proxy/<external url>.

For example, a http post to the API endpoint

https://api.mymeq.com/json/user/login

gets sent as

http://192.168.2.59:3000/proxy/https%3A%2F%2Fapi.mymeq.com%2Fjson%2Fuser%2Flogin

...to which the API server is responding with a 403. I would like to circumvent the local proxy entirely. How can I do this?

amacrobert
  • 2,707
  • 2
  • 28
  • 37

2 Answers2

1

Using phonegap browser run instead of phonegap serve worked, because it doesn't route requests through a proxy.

amacrobert
  • 2,707
  • 2
  • 28
  • 37
1

Just in case someone ends up here, there is now a flag to do this. Just run phonegap serve --no-proxy.

Ivan Babic
  • 21
  • 2