mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: normalize url
This commit is contained in:
parent
f9cb542dd0
commit
90b1d39cc6
@ -19,11 +19,6 @@ export function normalizeUrl(urlString: string, debug = false, options = {
|
||||
throw new Error('Empty URL');
|
||||
}
|
||||
|
||||
|
||||
if (!/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(urlString)) {
|
||||
urlString = 'https://' + urlString;
|
||||
}
|
||||
|
||||
const url = new URL(urlString);
|
||||
|
||||
url.hostname = url.hostname.toLowerCase();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user