diff --git a/scripts/testBikegearProxy.js b/scripts/testBikegearProxy.js index 26e3e6d..fd90f8e 100644 --- a/scripts/testBikegearProxy.js +++ b/scripts/testBikegearProxy.js @@ -108,7 +108,9 @@ async function main() { const title = await page.title().catch(() => ""); const html = await page.content(); const productLinks = (html.match(/class="product-img/g) || []).length; - const hasCloudflare = /cloudflare|cf-error|cf-browser-verification|Just a moment/i.test(html); + const hasChallengeTitle = /just a moment|attention required|access denied/i.test(title); + const hasChallengeMarkup = /cf-error|cf-browser-verification|challenge-platform|cdn-cgi\/challenge-platform/i.test(html); + const hasCloudflare = hasChallengeTitle || hasChallengeMarkup; console.log(`[BIKEGEAR-PROXY-TEST] status=${status}`); console.log(`[BIKEGEAR-PROXY-TEST] title=${title || "-"}`);