I have an ionic v1 application which was working fine, but a few weeks ago when I built new signed .apk file all $http requests just stop working.
Here is an example of request
$http({
method: 'GET',
url: 'https://some-url.com/user/id'
}).then(function (response) {
alert(response.data);
}, function (error) {
alert('Error ' + JSON.stringify(error));
});
I always get error callback with {data: null, status -1, headers: ...}
What is interesting that when I build simple apk or just running cordova run android
everything works fine. Only not working in signed apk.
I already tried to update cordova-plugin-whitelist
and added
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">
to my index.html file. Also added <allow-navigation href="*" />
to my config.xml file.
Does anyone have some ideas why this is happening? Maybe android sdk changed the way of building signed apk and I need some addintional configuration.