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 cursor/pin-resumes-upload-url-5c11

Kiran Kdaf4a035dc4d
diff --cc apps/web/lib/upstash/ratelimit-policies.ts
index cb39b0341e,b9bbee67da..8990f57eb3
--- a/apps/web/lib/upstash/ratelimit-policies.ts
+++ b/apps/web/lib/upstash/ratelimit-policies.ts
@@@ -203,10 -203,76 +203,83 @@@ export const RATELIMIT_POLICIES =
message: "Too many verification attempts. Please try again later.",
},
+ resumeUpload: {
+ attempts: 5,
+ window: "1 h",
+ keyPrefix: "rl:resume:upload",
+ message: "Too many resume uploads. Please try again later.",
+ },
++
+ // Keyed on partner + program so one partner cannot exhaust another's budget
+ partnerAnalyticsExport: {
+ attempts: 1,
+ window: "30 s",
+ keyPrefix: "rl:analytics:export:partner",
+ message:
+ "Analytics export is limited to once every 30 seconds. Please try again shortly.",
+ },
+
+ createToken: {
+ attempts: 1,
+ window: "5 s",
+ keyPrefix: "rl:tokens:create",
+ },
+
+ submitLead: {
+ attempts: 10,
+ window: "1 m",
+ keyPrefix: "rl:submitted-lead",
+ message: "Too many leads submitted. Please try again later.",
+ },
+
+ trackApplication: {
+ attempts: 10,
+ window: "10 s",
+ keyPrefix: "rl:track:application",
+ },
+
+ workspaceInvite: {
+ attempts: 1,
+ window: "1 s",
+ keyPrefix: "rl:workspace:invites",
+ message:
+ "You've reached the rate limit for inviting teammates. Please try again later after few seconds.",
+ },
+
+ slackSupportInviteWorkspace: {
+ attempts: 5,
+ window: "1 d",
+ keyPrefix: "rl:slack-support-invite:workspace",
+ message:
+ "This workspace has reached the daily limit for Slack invite requests. Please try again tomorrow.",
+ },
+
+ // Keyed on workspace + user so one member cannot exhaust the workspace budget
+ slackSupportInviteUser: {
+ attempts: 10,
+ window: "1 h",
+ keyPrefix: "rl:slack-support-invite",
+ message:
+ "You've requested too many Slack invites recently. Please try again later.",
+ },
+
+ sitemapImport: {
+ attempts: 5,
+ window: "1 m",
+ keyPrefix: "rl:sitemap-import",
+ message:
+ "Sitemap import was requested too recently. Please wait a minute and try again.",
+ },
+
+ tremendousSendOtp: {
+ attempts: 10,
+ window: "24 h",
+ keyPrefix: "rl:tremendous:send-otp",
+ },
+
+ tremendousVerifyOtp: {
+ attempts: 10,
+ window: "24 h",
+ keyPrefix: "rl:tremendous:verify-otp",
+ },
} as const satisfies Record<string, RatelimitPolicy>;