Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix 726 添加 wss? 和 taf 自定义协议的支持
  • Loading branch information
hushiling committed Jun 30, 2020
1 parent f317a1a commit 5ca063b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/api.ts
Expand Up @@ -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(
Expand Down

0 comments on commit 5ca063b

Please sign in to comment.