We want every link on the app to be able to be opened in the external browser on the system, with the exception of a selection of hostnames.
We tried putting <allow-navigation href="*.hostname.com/*"/>
, but this gets overridden when you use <allow-intent href="http://*/*" /> and <allow-intent href="https://*/*"
as the intent tags for all the other links in the app.
The expected result would be our hostnames being opened within the app, but they open on the external browser instead.
I've tried looking at all the recent documentation and help available on the net, but could not find an answer to my solution. Hope you guys know.
Edit: forgot to mention we run the latest cordova CLI and the latest whitelist plugin with the inappbrowser plugin.
Sincerely,
Daniel
Try changing your <allow-*
> tags to this:
<allow-intent href="*.hostname.com/*"
<allow-navigation href="https://*/*"
<allow-navigation href="http://*/*"
<allow-access href="https://*/*"
<allow-access href="http://*/*"
The <allow-navigation>
tag is for controlling urls the Cordova webview itself can be navigated to.
Look at this article for a better understanding on Cordova's Whitelist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With