Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

edit limit

Steven Tey1bc6905a3ce0
diff --git a/lib/middleware/link.ts b/lib/middleware/link.ts
index d6b51863b8..220963c20a 100644
--- a/lib/middleware/link.ts
+++ b/lib/middleware/link.ts
@@ -27,8 +27,7 @@ export default async function LinkMiddleware(
}
const ip = ipAddress(req) || LOCALHOST_IP;
const { success } = await ratelimit(
- // 25 redirects / day for dub.sh/github demo link, 10 redirects / 10s for other dub.sh links
- 10,
+ 5,
key === "github" ? "1 d" : "10 s",
).limit(`${ip}:${domain}:${key}`);
diff --git a/pages/api/edge/links/[key]/stats/[endpoint].ts b/pages/api/edge/links/[key]/stats/[endpoint].ts
index fb26ecddbe..1e913d65ba 100644
--- a/pages/api/edge/links/[key]/stats/[endpoint].ts
+++ b/pages/api/edge/links/[key]/stats/[endpoint].ts
@@ -25,7 +25,7 @@ export default async function handler(req: NextRequest) {
}
const ip = ipAddress(req) || LOCALHOST_IP;
const { success } = await ratelimit(
- 10,
+ 5,
key === "github" ? "1 d" : "10 s",
).limit(`${ip}:${domain}:${key}:${endpoint}`);