Skip to content

Commit e9c79dd

Browse files
committedMay 17, 2024
[Fix] 🐛 Support Latest Bypass Error
1 parent b4a31d6 commit e9c79dd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎cloudflare/worker.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,10 @@ export default {
532532
}
533533

534534
if (currentUrl.pathname === '/turing/captcha/challenge') {
535-
if (currentUrl.searchParams.get('h') != '') {
536-
let params = currentUrl.searchParams.delete('h');
537-
targetUrl = new URL(BING_ORIGIN + '/turing/captcha/challenge' + params.search);
535+
if (currentUrl.searchParams.get('h') != '' && currentUrl.searchParams.get('h') != null && currentUrl.searchParams.get('h') != undefined) {
536+
let params = currentUrl.searchParams;
537+
params.delete('h');
538+
targetUrl = new URL(BING_ORIGIN + '/turing/captcha/challenge' + (params.toString() == '' ? '' : '?' + params.toString()));
538539
} else {
539540
return challenge(request);
540541
}

0 commit comments

Comments
 (0)
Please sign in to comment.