From eaf0bf488d059dbaa6ff59e2c12382d093a0870c Mon Sep 17 00:00:00 2001 From: JimmyLv Date: Fri, 3 Mar 2023 00:34:44 +0800 Subject: [PATCH] fix: add log for licenseKey --- middleware.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/middleware.ts b/middleware.ts index db12b560..b87799f0 100644 --- a/middleware.ts +++ b/middleware.ts @@ -44,6 +44,8 @@ export async function middleware(req: NextRequest, context: NextFetchEvent) { licenseKeys?.includes(apiKey.toLowerCase()) ) { const { remaining } = await ratelimit.limit(apiKey.toLowerCase()); + // TODO: log to hit licenseKey + console.log(`!!!!!!!!! {short-xxxx-licenseKey}, remaining: ${remaining} ========`); if (remaining === 0) { return NextResponse.redirect(new URL("/shop", req.url)); }