feat: enforce route-level rate limits for webhook auth and user actions
This commit is contained in:
@@ -20,6 +20,11 @@ const config = {
|
||||
stateFilePath: strFromEnv("STATE_FILE_PATH", "./data/state.json"),
|
||||
xWebhookSecret: process.env.X_WEBHOOK_SECRET || "dev-x-secret",
|
||||
polarWebhookSecret: process.env.POLAR_WEBHOOK_SECRET || "dev-polar-secret",
|
||||
rateLimits: {
|
||||
webhookPerMinute: intFromEnv("WEBHOOK_RPM", 120),
|
||||
authPerMinute: intFromEnv("AUTH_RPM", 30),
|
||||
actionPerMinute: intFromEnv("ACTION_RPM", 60),
|
||||
},
|
||||
credit: {
|
||||
baseCredits: intFromEnv("BASE_CREDITS", 1),
|
||||
includedChars: intFromEnv("INCLUDED_CHARS", 25000),
|
||||
|
||||
Reference in New Issue
Block a user