Ajax command to request URL no longer works

I just updated my version of cordova. When i started

cordova -v 

It outputs version 5.0.0

In the old version of Cordoba, I (I really don’t remember which version was), I was able to use AJAX to request data from a given URL. However, after updating the version of Cordoba, it no longer works. After this update, I did not edit the code, so I assume that something in the new version of Cordoba interferes with the flow of requests.

The following permissions are added to the config.xml file:

 <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <platform name="android"> <allow-intent href="market:*" /> </platform> 

but still no luck.

Has anyone encountered a similar problem? Any idea how I can make it work again?

Thank,

+20
jquery ajax cordova
Apr 20 '15 at 20:19
source share
2 answers

It turns out I'm just missing the following plugin:

Cordova-plugin-whitelist

After I installed it, rm on the Android platform, added the Android platform again, built and launched, it will work!

+36
Apr 20 '15 at 20:34
source share

Just delete the meta tag content on the <meta http-equiv="Content-Security-Policy"> index page

0
Apr 12 '16 at 14:24
source share



All Articles