mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-18 23:55:57 +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') {
|
if (!requestUrl.startsWith('http:') && !requestUrl.startsWith('https:') && !requestUrl.startsWith('chrome-extension:') && requestUrl !== 'about:blank') {
|
||||||
return req.abort('blockedbyclient', 1000);
|
return req.abort('blockedbyclient', 1000);
|
||||||
}
|
}
|
||||||
const tldParsed = tldExtract(requestUrl);
|
try {
|
||||||
domainSet.add(tldParsed.domain);
|
const tldParsed = tldExtract(requestUrl);
|
||||||
|
domainSet.add(tldParsed.domain);
|
||||||
|
} catch (err) {
|
||||||
|
return req.abort('blockedbyclient', 1000);
|
||||||
|
}
|
||||||
|
|
||||||
const parsedUrl = new URL(requestUrl);
|
const parsedUrl = new URL(requestUrl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user