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="https://stackoverflow.com/questions/30060534/*" />

in place of the old, <access origin="https://stackoverflow.com/questions/30060534/*" /> 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.

Leave a Comment