mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2026-04-28 02:45:34 +02:00
Set puppeteer timeout half of maxTimeout param. Resolves #180
This commit is contained in:
@@ -13,7 +13,8 @@ const CAPTCHA_SELECTORS = ['input[name="cf_captcha_kind"]'];
|
||||
export default async function resolveChallenge(url: string, page: Page, response: Response): Promise<Response> {
|
||||
|
||||
// look for challenge and return fast if not detected
|
||||
if (response.headers().server.startsWith('cloudflare') &&
|
||||
if (response.headers().server &&
|
||||
response.headers().server.startsWith('cloudflare') &&
|
||||
(response.status() == 403 || response.status() == 503)) {
|
||||
log.info('Cloudflare detected');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user