Skip to content

Commit

Permalink
Testing rate limiter #6
Browse files Browse the repository at this point in the history
  • Loading branch information
david emioma committed Mar 29, 2024
1 parent 754eecb commit 23e289f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actions/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ export const login = async (
try {
const ip = headers().get("x-forwarded-for") ?? "".split(",")[0].trim();

const { success, remaining, limit } = await ratelimit.limit(ip);
const { success } = await ratelimit.limit(ip);

if (!success && process.env.NODE_ENV === "production") {
if (!success && process.env.VERCEL_ENV === "production") {
return { error: "Too Many Requests! try again in 1 min" };
}

Expand Down

0 comments on commit 23e289f

Please sign in to comment.