From eb216cf779a3ede13a8e390175565d34a31c49a2 Mon Sep 17 00:00:00 2001 From: Xavier Abad <77491413+xabg2@users.noreply.github.com> Date: Tue, 10 Feb 2026 11:38:53 +0100 Subject: [PATCH] fix(products): add custom RL for products EPs --- src/controller/products.controller.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controller/products.controller.ts b/src/controller/products.controller.ts index fd7c1246..efbf7893 100644 --- a/src/controller/products.controller.ts +++ b/src/controller/products.controller.ts @@ -8,7 +8,13 @@ import { setupAuth } from '../plugins/auth'; export function productsController(productsService: ProductsService, cacheService: CacheService, config: AppConfig) { return async function (fastify: FastifyInstance) { - await setupAuth(fastify, { secret: config.JWT_SECRET }); + await setupAuth(fastify, { + secret: config.JWT_SECRET, + rateLimit: { + timeWindow: '1 minute', + max: 20, + }, + }); fastify.get( '/',