Skip to content

Commit

Permalink
fix: exposed db from redis
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinfe123 committed Jun 22, 2024
1 parent 90d942a commit 3728a14
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/www/utils/ratelimit.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { Ratelimit } from "@upstash/ratelimit"
import { Redis } from "@upstash/redis"
export const db: Redis = new Redis({
url: process.env.UPSTASH_REDIS_REST_URL!,
token: process.env.UPSTASH_REDIS_REST_TOKEN!
});

export const ratelimit = new Ratelimit({
redis: Redis.fromEnv(),
redis: db,
limiter: Ratelimit.slidingWindow(1, "30 m")

})

0 comments on commit 3728a14

Please sign in to comment.