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( '/',