From 72aa3585b59c951bc3ec46b7e1bf27d9e7fdd57d Mon Sep 17 00:00:00 2001 From: Harry-zklcdc Date: Wed, 8 May 2024 23:59:36 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=20=F0=9F=90=9B=20Vercel=20Deploy=20Chines?= =?UTF-8?q?e=20Q&A=20Error=20#409?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cloudflare/worker.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/cloudflare/worker.js b/cloudflare/worker.js index 49979c0dc0..215e541f46 100644 --- a/cloudflare/worker.js +++ b/cloudflare/worker.js @@ -546,6 +546,33 @@ export default { return pass(request, cookies); } + if (currentUrl.pathname.startsWith('/sydney')) { + const cookieStr = cookies; + cookies = ''; + cookieStr.split(';').forEach(item => { + if (!item) { + return; + } + const arr = item.split('='); + const key = arr[0].trim(); + const val = arr[1].trim(); + if (key === 'KievRPSSecAuth') { + cookies += 'KievRPSSecAuth=' + val + '; '; + } + if (key === '_RwBf') { + cookies += '_RwBf=' + val + '; '; + } + if (key === 'MUID') { + cookies += 'MUID=' + val + '; '; + } + if (key === '_U') { + cookies += '_U=' + val + '; '; + } + if (key === 'cct=') { + cookies += 'cct=' + val + '; '; + } + }) + } newHeaders.set('Cookie', cookies); const oldUA = request.headers.get('user-agent') || ''; const isMobile = oldUA.includes('Mobile') || oldUA.includes('Android');