Update utils.ts

This commit is contained in:
freearhey
2026-03-11 07:08:24 +03:00
parent 850a6beeb8
commit e79445e28d

View File

@@ -2,8 +2,8 @@ import normalizeUrl from 'normalize-url'
export function isURI(string: string): boolean {
try {
new URL(string)
return true
const url = new URL(string)
return /^(http:|https:|mmsh:|rtsp:|rtmp:)/.test(url.protocol)
} catch {
return false
}