Skip to content

Commit

Permalink
fix: not redirect for free user
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 7, 2023
1 parent 8a382ff commit cfa53c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function middleware(req: NextRequest, context: NextFetchEvent) {
}

if (!userKey) {
const identifier = req.ip ?? "127.0.0.7";
const identifier = req.ip ?? "127.0.0.8";
const { success, remaining } = await ratelimitForIps.limit(identifier);
console.log(
`======== ip ${identifier}, remaining: ${remaining} ========`
Expand Down Expand Up @@ -76,7 +76,7 @@ export async function middleware(req: NextRequest, context: NextFetchEvent) {
return redirectAuth();
}

return redirectAuth();
// return redirectAuth();
}

const result = await redis.get<string>(cacheId);
Expand Down

1 comment on commit cfa53c0

@vercel
Copy link

@vercel vercel bot commented on cfa53c0 Mar 7, 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.