From 7a82798cdc38636304ff5d0b4b6655c985d6ae6a Mon Sep 17 00:00:00 2001 From: Nevo David Date: Sun, 28 Dec 2025 18:24:33 +0700 Subject: [PATCH] feat: fix throttler --- .../nestjs-libraries/src/throttler/throttler.provider.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/nestjs-libraries/src/throttler/throttler.provider.ts b/libraries/nestjs-libraries/src/throttler/throttler.provider.ts index beb01763..8118aaa3 100644 --- a/libraries/nestjs-libraries/src/throttler/throttler.provider.ts +++ b/libraries/nestjs-libraries/src/throttler/throttler.provider.ts @@ -11,12 +11,14 @@ export class ThrottlerBehindProxyGuard extends ThrottlerGuard { return super.canActivate(context); } - return true; + return super.canActivate(context); } protected override async getTracker( req: Record ): Promise { - return req.org.id; + return ( + req.org.id + '_' + (req.url.indexOf('/posts') > -1 ? 'posts' : 'other') + ); } }