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.

Update tinybird.ts

Steven Teyc54cfb173741
diff --git a/apps/web/lib/tinybird.ts b/apps/web/lib/tinybird.ts
index 84f865eb89..0450e79286 100644
--- a/apps/web/lib/tinybird.ts
+++ b/apps/web/lib/tinybird.ts
@@ -33,7 +33,7 @@ export async function recordClick({
const ip = ipAddress(req) || LOCALHOST_IP;
// deduplicate clicks from the same IP, domain and key – only record 1 click per hour
const { success } = await ratelimit(2, "1 h").limit(
- `recordClick:${ip}:${domain}:${key}`,
+ `recordClick:${ip}:${domain}:${key || "_root"}`,
);
if (!success) {
return null;