From 91356cd6ac098c59f1e36df1d09b57c930aee853 Mon Sep 17 00:00:00 2001 From: MOHAN Date: Sat, 1 Aug 2026 18:39:24 +0530 Subject: [PATCH] fix(bikegear): avoid false Cloudflare challenge in proxy test --- scripts/testBikegearProxy.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 || "-"}`);