收紧移动壳外链协议白名单
Expo WebView 外域导航只允许安全外链协议交给系统 阻断危险协议避免外链页面保留宿主桥能力 补充移动壳导航测试和宿主壳文档
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { normalizeHostBridgeExternalUrl } from '../../../packages/shared/src/contracts/hostBridge';
|
||||
|
||||
export function shouldOpenInMobileShellWebView(
|
||||
rawUrl: string,
|
||||
allowedOrigin: string,
|
||||
@@ -26,6 +28,10 @@ export function shouldOpenInMobileShellWebView(
|
||||
}
|
||||
}
|
||||
|
||||
export function resolveMobileShellExternalUrl(rawUrl: string) {
|
||||
return normalizeHostBridgeExternalUrl(rawUrl);
|
||||
}
|
||||
|
||||
export function resolveMobileShellWebViewUrl(
|
||||
rawUrl: string,
|
||||
allowedOrigin: string,
|
||||
|
||||
Reference in New Issue
Block a user