fix 726 添加 wss? 和 taf 自定义协议的支持

This commit is contained in:
pengxing 2020-06-30 20:31:26 +08:00
parent f317a1abf8
commit 5ca063bc6f

View File

@ -253,7 +253,10 @@ export function isApiOutdated(
}
export function isValidApi(api: string) {
return api && /^(?:https?:\/\/[^\/]+)?(\/[^\s\/\?]*){1,}(\?.*)?$/.test(api);
return (
api &&
/^(?:(https?|wss?|taf):\/\/[^\/]+)?(\/[^\s\/\?]*){1,}(\?.*)?$/.test(api)
);
}
export function isEffectiveApi(