diff --git a/src/utils/url-tools.ts b/src/utils/url-tools.ts index 31ab254..f166884 100644 --- a/src/utils/url-tools.ts +++ b/src/utils/url-tools.ts @@ -24,6 +24,9 @@ export function normalizeUrl(urlString: string, debug = false, options = { } const url = new URL(urlString); + if (url.protocol !== 'http:' && url.protocol !== 'https:') { + throw new Error('Unsupported protocol'); + } url.hostname = url.hostname.toLowerCase(); if (url.hostname.startsWith('www.')) {