Merge remote-tracking branch 'amis/master'

This commit is contained in:
rickcole 2020-06-30 21:38:48 +08:00
commit 86d8a1c4e0

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(