import { ThrottlerGuard } from '@nestjs/throttler'; import { Injectable } from '@nestjs/common'; @Injectable() export class ThrottlerBehindProxyGuard extends ThrottlerGuard { protected async getTracker(req: Record): Promise { return req.ips.length ? req.ips[0] : req.ip; // individualize IP extraction to meet your own needs } }