mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-19 01:25:59 +08:00
fix: request to unknown domain
This commit is contained in:
parent
5a4b35e4b9
commit
339af19192
@ -341,8 +341,12 @@ export class PuppeteerControl extends AsyncService {
|
||||
if (!requestUrl.startsWith('http:') && !requestUrl.startsWith('https:') && !requestUrl.startsWith('chrome-extension:') && requestUrl !== 'about:blank') {
|
||||
return req.abort('blockedbyclient', 1000);
|
||||
}
|
||||
const tldParsed = tldExtract(requestUrl);
|
||||
domainSet.add(tldParsed.domain);
|
||||
try {
|
||||
const tldParsed = tldExtract(requestUrl);
|
||||
domainSet.add(tldParsed.domain);
|
||||
} catch (err) {
|
||||
return req.abort('blockedbyclient', 1000);
|
||||
}
|
||||
|
||||
const parsedUrl = new URL(requestUrl);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user