From 568138c36ff9fda88fd2a8dbbe6a5459a93d5291 Mon Sep 17 00:00:00 2001 From: feie9456 Date: Tue, 13 May 2025 08:56:57 +0800 Subject: [PATCH] add redirect info --- index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 3871360..7c216f3 100644 --- a/index.ts +++ b/index.ts @@ -35,8 +35,7 @@ function createHmac(message: string, secretKey: string) { // 验证 HMAC function verifyHmac(message: string, secretKey: string, hash: string) { const calculatedHash = createHmac(message, secretKey); - console.log(`calculatedHash: ${calculatedHash}, hash: ${hash}`); - + return calculatedHash === hash; } @@ -46,7 +45,7 @@ app.get<{ Params: { pj: string, ['*']: string }, Querystring: { secretKey: strin if (pj + "/" + pth != targetFile) { return res.status(400).send({ - message: `Use ${targetFile} instead of ${pj + pth}` + message: `Use ${targetFile} as path instead` }); }