From e3b826db5a2dd86c15b3c5f5bdfbd7fec8d781ad Mon Sep 17 00:00:00 2001 From: Hazelnoot Date: Fri, 22 Nov 2024 13:43:06 -0500 Subject: add rate limits to all public endpoints --- packages/backend/src/server/api/endpoints/notifications/flush.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'packages/backend/src/server/api/endpoints/notifications/flush.ts') diff --git a/packages/backend/src/server/api/endpoints/notifications/flush.ts b/packages/backend/src/server/api/endpoints/notifications/flush.ts index 47c0642fd1..ab78435b89 100644 --- a/packages/backend/src/server/api/endpoints/notifications/flush.ts +++ b/packages/backend/src/server/api/endpoints/notifications/flush.ts @@ -13,6 +13,12 @@ export const meta = { requireCredential: true, kind: 'write:notifications', + + // 2 calls per 10 seconds + limit: { + duration: 1000 * 10, + max: 2, + }, } as const; export const paramDef = { -- cgit v1.2.3-freya