From bbba161d55caf7c52ab2fb4fcb94c10221fdf773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=AE=E5=87=89?= <927625802@qq.com> Date: Thu, 9 Dec 2021 23:01:52 +0800 Subject: [PATCH] :bug: fix proxy sign mismatch --- alist-proxy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alist-proxy.js b/alist-proxy.js index 01f68791..96dfe770 100644 --- a/alist-proxy.js +++ b/alist-proxy.js @@ -12,7 +12,7 @@ const corsHeaders = { async function handleRequest(request) { const origin = request.headers.get("origin"); const url = new URL(request.url); - const path = url.pathname; + const path = decodeURI(url.pathname); const sign = url.searchParams.get("sign"); const name = path.split("/").pop(); const right = md5(`alist-${TOKEN}-${name}`).slice(8, 24); @@ -39,7 +39,7 @@ async function handleRequest(request) { Authorization: TOKEN, }, body: JSON.stringify({ - path: decodeURI(path), + path: path, }), }); let res = await resp.json();