chore: trace security.ts log

This commit is contained in:
2025-11-28 16:02:47 +08:00
parent 9743598e73
commit 406c8c9ce2

View File

@@ -98,6 +98,8 @@ export const verifyApiKey = (app: Elysia) => app.onBeforeHandle((ctx) => {
// 验证token
if (token !== process.env.ADMIN_API_KEY) {
// 记录失败日志
console.warn(`Failed API key verification for token: <${token}>`);
return new Response('Forbidden', { status: 403 });
}
});