Skip to content

Commit

Permalink
fix: rename to shop
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyLv committed Mar 2, 2023
1 parent 203563a commit 8eb7999
Show file tree
Hide file tree
Showing 2 changed files 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 @@ -32,7 +32,7 @@ export async function middleware(req: NextRequest, ev: NextFetchEvent) {
if (process.env.USER_LICENSE_KEYS?.includes(apiKey)) {
const { remaining } = await ratelimit.limit(apiKey);
if (remaining === 0) {
return NextResponse.redirect(new URL("/blocked", req.url));
return NextResponse.redirect(new URL("/shop", req.url));
}
}

Expand All @@ -41,7 +41,7 @@ export async function middleware(req: NextRequest, ev: NextFetchEvent) {
const { success, remaining } = await ratelimit.limit(identifier);
console.log(`======== ip ${identifier}, remaining: ${remaining} ========`);
if (!apiKey && !success) {
return NextResponse.redirect(new URL("/blocked", req.url));
return NextResponse.redirect(new URL("/shop", req.url));
}
}

Expand Down
File renamed without changes.

0 comments on commit 8eb7999

Please sign in to comment.