From b906c0cbea7abb18426d54288fe404ed5d471c85 Mon Sep 17 00:00:00 2001 From: Daniel Holmgren Date: Thu, 18 Jan 2024 16:16:10 -0600 Subject: [PATCH] Add uploadBlob rate limit (#2052) uploadBlob ratelimit --- packages/pds/src/api/com/atproto/repo/uploadBlob.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/pds/src/api/com/atproto/repo/uploadBlob.ts b/packages/pds/src/api/com/atproto/repo/uploadBlob.ts index f3cc9974d49..4bb536f804e 100644 --- a/packages/pds/src/api/com/atproto/repo/uploadBlob.ts +++ b/packages/pds/src/api/com/atproto/repo/uploadBlob.ts @@ -1,9 +1,14 @@ import { Server } from '../../../../lexicon' import AppContext from '../../../../context' +import { DAY } from '@atproto/common' export default function (server: Server, ctx: AppContext) { server.com.atproto.repo.uploadBlob({ auth: ctx.authVerifier.accessCheckTakedown, + rateLimit: { + durationMs: DAY, + points: 1000, + }, handler: async ({ auth, input }) => { const requester = auth.credentials.did