We have the following configuration:
However, the app cannot get data from the intranet server. The response to the request is
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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.