Difference between allow-navigation and allow-intent

与世无争的帅哥 提交于 2019-12-03 22:37:47

@Abtin, per the documentation:

allow-navigation

Controls which URLs the WebView itself can be navigated to. Applies to top-level navigations only.

allow-intent

Controls which URLs the app is allowed to ask the system to open. By default, no external URLs are allowed.

This whitelist worksheet should help.
HOW TO apply the Cordova/Phonegap the whitelist system

robert

allow-navigation

Controls which URLs the WebView itself can be navigated to. Applies to top-level navigations only.

In other words, this affects links in your HTML/JS code, shown directly in the WebView (which is where your HTML5 app runs).

allow-intent

Controls which URLs the app is allowed to ask the system to open.

This affects requests by native code (typically originating from Cordova plugins) to the native system (Different from a security standpoint, since these requests are not 'sandboxed' in the WebView).

See here for details and types of configuration
https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!