Skip to content

Commit

Permalink
fix: add log for licenseKey
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 2, 2023
1 parent beb7f42 commit eaf0bf4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

1 comment on commit eaf0bf4

@vercel
Copy link

@vercel vercel bot commented on eaf0bf4 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.