允许导航和允许意图之间的区别
Difference between allow-navigation and allow-intent
有人知道 cordova 白名单中 allow-navigation 和 allow-intent 的区别吗?
允许导航
Controls which URLs the WebView itself can be navigated to. Applies to
top-level navigations only.
换句话说,这会影响 HTML/JS 代码中的链接,直接显示在 WebView 中(这是您的 HTML5 应用运行的地方)。
允许意图
Controls which URLs the app is allowed to ask the system to open.
这会影响本机代码(通常源自 Cordova 插件)对本机系统的请求(从安全角度来看不同,因为这些请求不在 WebView 中 'sandboxed')。
查看此处了解详细信息和配置类型
https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md
根据文档:
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.
这份白名单工作表应该有所帮助。
HOW TO apply the Cordova/Phonegap the whitelist system
有人知道 cordova 白名单中 allow-navigation 和 allow-intent 的区别吗?
允许导航
Controls which URLs the WebView itself can be navigated to. Applies to top-level navigations only.
换句话说,这会影响 HTML/JS 代码中的链接,直接显示在 WebView 中(这是您的 HTML5 应用运行的地方)。
允许意图
Controls which URLs the app is allowed to ask the system to open.
这会影响本机代码(通常源自 Cordova 插件)对本机系统的请求(从安全角度来看不同,因为这些请求不在 WebView 中 'sandboxed')。
查看此处了解详细信息和配置类型
https://github.com/apache/cordova-plugin-whitelist/blob/master/README.md
根据文档:
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.
这份白名单工作表应该有所帮助。
HOW TO apply the Cordova/Phonegap the whitelist system