Hi guys,
I am executing the following request
app.request.json("https://www.mydomain.com",
{ seconds: 31556952, username: input_username, password: inp_password
}, function (cookie){
console.log(cookie);
}, function (error){
console.log(error);
});
The answer I get from Google Chrome or PhoneGap Developer APP it returns the console.log(cookie), but when I execute the .apk file on my phone it returns the console.log(error).
GET https://www.domain.com 404 framework7.js:3772 (Not Found)
Any Ideas why?
1 Like
Make sure you have whitelisted request URL in your config.xml
1 Like
Still not working
<access origin="*" />
<access origin="https://www.diecast-collections.com" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
Try also
<allow-navigation href=“*” />
@nolimits4web, which one should I use?
<meta http-equiv="Content-Security-Policy" content="default-src * 'self' 'unsafe-inline' 'unsafe-eval' data: gap:" />
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' data: gap:" />
Problem Solved. Missing whitelist plugin
<plugin name="cordova-plugin-whitelist" spec="~1.3.3" />
Basically for <allow-navigation href=“*” />
need the above plugin.
2 Likes