From d035bcc9a3498f416d45d197e68d6b2a16ab06cc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 30 Oct 2025 20:05:18 +0000 Subject: [PATCH] Fix throttle TTL to use milliseconds per NestJS v6 docs Co-authored-by: abouolia <2197422+abouolia@users.noreply.github.com> --- packages/server/src/common/config/throttle.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/common/config/throttle.ts b/packages/server/src/common/config/throttle.ts index 5da517b73..70ac6e044 100644 --- a/packages/server/src/common/config/throttle.ts +++ b/packages/server/src/common/config/throttle.ts @@ -2,10 +2,12 @@ import { registerAs } from '@nestjs/config'; export default registerAs('throttle', () => ({ global: { - ttl: parseInt(process.env.THROTTLE_GLOBAL_TTL ?? '60', 10), + // TTL in milliseconds (NestJS throttler v6+) + ttl: parseInt(process.env.THROTTLE_GLOBAL_TTL ?? '60000', 10), limit: parseInt(process.env.THROTTLE_GLOBAL_LIMIT ?? '100', 10), }, auth: { + // TTL in milliseconds (NestJS throttler v6+) ttl: parseInt(process.env.THROTTLE_AUTH_TTL ?? '60000', 10), limit: parseInt(process.env.THROTTLE_AUTH_LIMIT ?? '10', 10), },