收紧移动壳外链协议白名单

Expo WebView 外域导航只允许安全外链协议交给系统

阻断危险协议避免外链页面保留宿主桥能力

补充移动壳导航测试和宿主壳文档
This commit is contained in:
2026-06-18 00:35:14 +08:00
parent fec8b626f5
commit ee49c26868
5 changed files with 33 additions and 4 deletions
@@ -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,