White-list already installed. CORS on server enabled. use in config.xml:
<plugin name="cordova-plugin-whitelist" spec="1" />
<platform name="android">
<allow-intent href="market:*" />
<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
<access launch-external="yes" origin="*" />
</platform>
Ajax:
$.ajax({
url : "http://127.0.0.1",
type : "POST",
data : {},
crossDomain: true,
dataType: 'json',
success : formSuccessAuth,
error: function(xhr, status, error) {
alert(`${xhr.status} ${status} ${error}`);
}
});
meta in index.html:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
After sending req I get the message: 0 error