Downloaded files denied Cordova

create an app on cordova and I'm using Framework7. In this application, consult a web server that returns some data to me, including a link to download a pdf material, but I'm getting an error message because I don't have permission to download it includes the website address on the access source at config.xml.

I have the cordova-plugin-whitelist plugin installed and in config.xml I configured the following

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

I have already followed several recommendations from other forums, but nothing works. I always receive the following message: net :: ERR_FAILED (

Could someone help me solve this problem that I have been facing for 2 months.


1 answer

  • answered 2020-04-02 15:24 Federico Massi

    You can try to solve by creating a more general rule as:

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

    and a Content Security Policy as

    <meta http-equiv="Content-Security-Policy" content="default-src 'self'">

    Take care on the position of files (.htaccess rewrite rules could make you have a hard day ifyou don't check them). I'm quite sure you just check the presence of external class on your link in HTML, isn't it?