🐛 fix proxy sign mismatch
This commit is contained in:
parent
6b61f8e9cc
commit
bbba161d55
@ -12,7 +12,7 @@ const corsHeaders = {
|
|||||||
async function handleRequest(request) {
|
async function handleRequest(request) {
|
||||||
const origin = request.headers.get("origin");
|
const origin = request.headers.get("origin");
|
||||||
const url = new URL(request.url);
|
const url = new URL(request.url);
|
||||||
const path = url.pathname;
|
const path = decodeURI(url.pathname);
|
||||||
const sign = url.searchParams.get("sign");
|
const sign = url.searchParams.get("sign");
|
||||||
const name = path.split("/").pop();
|
const name = path.split("/").pop();
|
||||||
const right = md5(`alist-${TOKEN}-${name}`).slice(8, 24);
|
const right = md5(`alist-${TOKEN}-${name}`).slice(8, 24);
|
||||||
@ -39,7 +39,7 @@ async function handleRequest(request) {
|
|||||||
Authorization: TOKEN,
|
Authorization: TOKEN,
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
path: decodeURI(path),
|
path: path,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
let res = await resp.json();
|
let res = await resp.json();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user