Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Ionic app on device “Failed to load resource” after Cordova whitelist plugin is added

$
0
0

@Chipatama wrote:

I was playing with some small app in Ionic, and I could not manage to get it to work on my android device, first I was getting an error : "Failed to load resource " with 404 response, Then I installed Cordova whitelist plugin, added

<access origin="*"/>
<allow-navigation href="*"/>
<allow-intent href="*"/>

inside my config.xml file and I added meta tag inside my html

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'">

with this meta tag I was getting an error that Im breaking the policy of "script-src 'self'"

so I changed it to :

<meta http-equiv="Content-Security-Policy" content="default-src *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">

Now I don't get policy error but I'm just getting "Failed to load resource " without 404 response error,

Anyone has an idea what I'm I doing wrong since it's really frustrating :frowning:

App works normally in browser, and the API is working you can test it here: http://sremskevesti.rs/wp-json/posts

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>