add redirect info

This commit is contained in:
feie9456 2025-05-13 08:56:57 +08:00
parent a286cf778a
commit 568138c36f

View File

@ -35,8 +35,7 @@ function createHmac(message: string, secretKey: string) {
// 验证 HMAC // 验证 HMAC
function verifyHmac(message: string, secretKey: string, hash: string) { function verifyHmac(message: string, secretKey: string, hash: string) {
const calculatedHash = createHmac(message, secretKey); const calculatedHash = createHmac(message, secretKey);
console.log(`calculatedHash: ${calculatedHash}, hash: ${hash}`);
return calculatedHash === hash; return calculatedHash === hash;
} }
@ -46,7 +45,7 @@ app.get<{ Params: { pj: string, ['*']: string }, Querystring: { secretKey: strin
if (pj + "/" + pth != targetFile) { if (pj + "/" + pth != targetFile) {
return res.status(400).send({ return res.status(400).send({
message: `Use ${targetFile} instead of ${pj + pth}` message: `Use ${targetFile} as path instead`
}); });
} }