diff options
| author | Hayden Bleasel <hello@haydenbleasel.com> | 2025-07-24 14:41:34 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-25 00:41:34 +0300 |
| commit | 5931ddb77aac23ffe1b82d9d7c03afde3e671109 (patch) | |
| tree | 3e2ead9cc6e13c01132a78c21b64f2be7b00e215 /apps/web/src/lib/rate-limit.ts | |
| parent | 7b840e9b4e198212eb34861c21469b2215157914 (diff) | |
| download | opencut-5931ddb77aac23ffe1b82d9d7c03afde3e671109.tar.gz | |
feat: add ultracite (#452)
* Init ultracite
* Update scripts and biome.jsonc
* Update biome.jsonc
* Update biome.jsonc
* Update biome.jsonc
* Run format
Diffstat (limited to 'apps/web/src/lib/rate-limit.ts')
| -rw-r--r-- | apps/web/src/lib/rate-limit.ts | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/apps/web/src/lib/rate-limit.ts b/apps/web/src/lib/rate-limit.ts index ac63a64c..e1996cf5 100644 --- a/apps/web/src/lib/rate-limit.ts +++ b/apps/web/src/lib/rate-limit.ts @@ -1,16 +1,16 @@ -// lib/rate-limit.ts
-import { Ratelimit } from "@upstash/ratelimit";
-import { Redis } from "@upstash/redis";
-import { env } from "@/env";
-
-const redis = new Redis({
- url: env.UPSTASH_REDIS_REST_URL,
- token: env.UPSTASH_REDIS_REST_TOKEN,
-});
-
-export const waitlistRateLimit = new Ratelimit({
- redis,
- limiter: Ratelimit.slidingWindow(5, "1 m"), // 5 requests per minute
- analytics: true,
- prefix: "waitlist-rate-limit",
-});
+// lib/rate-limit.ts +import { Ratelimit } from "@upstash/ratelimit"; +import { Redis } from "@upstash/redis"; +import { env } from "@/env"; + +const redis = new Redis({ + url: env.UPSTASH_REDIS_REST_URL, + token: env.UPSTASH_REDIS_REST_TOKEN, +}); + +export const waitlistRateLimit = new Ratelimit({ + redis, + limiter: Ratelimit.slidingWindow(5, "1 m"), // 5 requests per minute + analytics: true, + prefix: "waitlist-rate-limit", +}); |
