Ajax requests fail after upgrading to Cordova 5.0 + [email protected]

I tracked the culprit down to the [email protected] cordova platform. It now requires the new cordova-plugin-whitelist plugin.

It can be installed with

cordova plugin add cordova-plugin-whitelist

or by adding

<plugin name="cordova-plugin-whitelist" spec="1" />

to config.xml, and then it is configured with

<allow-navigation href="*" />

in place of the old, <access origin="*" /> tag.

It's a little annoying that the log doesn't spit out the "whitelist rejection" error messages anymore when a problem like this comes up (that would have saved me a ton a time), but maybe that'll come later.


In Cordova 6.X you need to remove the builtin whitelist plugin and reinstall the new version of plugin.

cordova plugin remove cordova-plugin-whitelist

and re install the plugin

cordova plugin add cordova-plugin-whitelist

and then replace <allow-navigation href="*" /> to config.xml file instead of <access origin="*" /> in my case this trick worked.