mirror of
https://github.com/jina-ai/node-DeepResearch.git
synced 2025-12-26 06:28:56 +08:00
fix: url sanitization
This commit is contained in:
parent
ffc00756da
commit
3930f8b863
@ -19,6 +19,10 @@ export function normalizeUrl(urlString: string, debug = false, options = {
|
||||
throw new Error('Empty URL');
|
||||
}
|
||||
|
||||
if (urlString.startsWith('https://google.com') || urlString.startsWith('https://www.google.com')) {
|
||||
throw new Error('Google search link');
|
||||
}
|
||||
|
||||
const url = new URL(urlString);
|
||||
|
||||
url.hostname = url.hostname.toLowerCase();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user