AirWatch, Hybrid App, iOS and VPN tunnel

836 views Asked by At

We have the following configuration:

  • An iOS phone in the world wide web with AirWatch VPN installed.
  • A Cordova app trying to connect to an intranet server.
  • The AirWatch server is configured to tunnel the app's traffic (Per-App VPN), and while the cordova app is open, the VPN usage is indicated in the status bar.

However, the app cannot get data from the intranet server. The response to the request is

  • status 0
  • message undefined
  • responseText falsy

When using AirWatch browser to connect to the same URL (using VPN), it works. When using Safari (not using VPN), no connection to the server is possible.

In an all-intranet setting without AirWatch VPN, the app works as expected.

Now, I think Cordova uses a builtin Safari web browser. Is it possible that the request is not tunneled through VPN, although the app itself is VPN-enabled?

1

There are 1 answers

0
Luca On

Cordova uses Whitelist plugin to enable http calls from the WebView. In the config.xml file you should have lines like those

<allow-navigation href="https://slack.cordova.io" />
<allow-navigation href="http://www.google-analytics.com/" />
<allow-navigation href="https://*.imgur.com/" />
<allow-navigation href="https://*.twitter.com/" />
<allow-navigation href="https://*.twimg.com/" />
<allow-navigation href="http://cordovablogs.discus.com/" />

Try adding the tag allow-navigation with the URL's you want to call from within the cordova application