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.

Merge branch 'main' into jev-emoji-search

Pedro Ladeira20761031743f
diff --cc apps/web/lib/upstash/ratelimit-policies.ts
index b1c7a00ab5,f0693d3374..49cc6966e4
--- a/apps/web/lib/upstash/ratelimit-policies.ts
+++ b/apps/web/lib/upstash/ratelimit-policies.ts
@@@ -283,9 -283,51 +283,58 @@@ export const RATELIMIT_POLICIES =
keyPrefix: "rl:tremendous:verify-otp",
},
+ // Anonymous (unauthenticated) link creation by IP
+ anonymousLinkCreate: {
+ attempts: 10,
+ window: "1 d",
+ keyPrefix: "rl:links:create:anonymous",
+ message:
+ "Rate limited – you can only create up to 10 links per day without an account.",
+ },
+
+ // Shared by partner-profile + embed referrals social content stats
+ socialContentStats: {
+ attempts: 10,
+ window: "1 h",
+ keyPrefix: "rl:partner-profile:social-content-stats",
+ message: "You've been rate limited. Please try again later.",
+ },
+
+ inviteReferralEmailWorkspace: {
+ attempts: 5,
+ window: "1 m",
+ keyPrefix: "rl:invite-referral-email:workspace",
+ message: "Failed to send: rate limit exceeded",
+ },
+
+ // Keyed on the recipient so many workspaces can't spam the same address
+ inviteReferralEmailTarget: {
+ attempts: 2,
+ window: "2 h",
+ keyPrefix: "rl:invite-referral-email:target",
+ message: "Failed to send: rate limit exceeded",
+ },
+
+ // Keyed on step + user so each merge step has its own 24h budget
+ mergePartnerAccounts: {
+ attempts: 3,
+ window: "24 h",
+ keyPrefix: "rl:merge-partner-accounts",
+ message:
+ "You've reached the maximum number of attempts for the past 24 hours. Please wait and try again later.",
+ },
+
+ domainSearchAvailability: {
+ attempts: 1,
+ window: "5 s",
+ keyPrefix: "rl:domains:search-availability",
+ message: "Don't DDoS me pls 🥺",
+ },
++
+ emojiSearch: {
+ attempts: 30,
+ window: "10 s",
+ keyPrefix: "rl:ai:emoji-search",
++ message: "You've been rate limited. Please try again later.",
+ },
} as const satisfies Record<string, RatelimitPolicy>;