For some reason, my app now cannot load any external links (HTTP or HTTPS), and when I attempt to load them using iframe, I get the error ERR_BLOCKED_BY_CLIENT. To circumvent this, I've installed the cordova-whitelist plugin (https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/), but in its setup guide, it tells me to "add <allow-navigation> tags to your config.xml".
<allow-navigation>
config.xml
How would I go about doing this?
Fyi, I've already tried editing my extensibility configuration to add an access tag, but that didn't help.
Hi Ethan,
I found this video and this documentation about permission to use iframe. I believe you need to enable to use sources too.
https://success.outsystems.com/Documentation/10/Managing_the_Applications_Lifecycle/Secure_the_Applications/Apply_Content_Security_Policy
Hope this help you,
Best Regards,
Leandro.
Hi Ethan Kok,
At very first I didn't get why you cannot open any URL on the Iframe....?
Perhaps coming to your question, the <allow-navigation> the tag needs to be added under the Cordova-Project & not in the Outsystems.You can either create your own Cordova Repo & apply the same in Config.xml there & then consume it as a Plugin in Outsystems Project.
There's already a Plugin on git :
https://github.com/apache/cordova-plugin-whitelist
You can use it as a Plugin in OutSystems.
Still, I would like to know what is the issue in using any XYZ URL on iframe.
Hope it helps,
Assif
assif_tiger wrote:
Hi Assif,
I've tried doing as you suggested, and now my app has the necessary <allow-navigation> tags. However, all of my links (both https and http) still don't load.
If I try to load an image using an external URL, the broken image icon comes up, and the only way I can get any images to load at all is by encrypting them into Base64 (i.e. data:image/jpeg;base64).
If I try to load any link using iframe, I get the error net::ERR_BLOCKED_BY_CLIENT.
Do you have any suggestions as to why this is and how I might go about fixing it or finding out what the issue is?
Thanks for all your help.
Regards,Ethan
- Are you trying to load base-64 content via Iframe?
I mean something like this :
<iframe src="data:application/pdf;base64,YOUR_BINARY_DATA" height="100%" width="100%"></iframe>
No, I'm trying to load https content via iframe, and https image links using the Image widget's External URL function.
What I meant by the Base64 is that the only way I can load external URL links is by using the Base64 format; if I try to use https it doesn't work.
This is despite my having whitelisted https links using <allow-navigation>.
Take a look at this forge component https://www.outsystems.com/forge/component-overview/3079/edit-plist-file-plugin