NestJS · Senior · Question 72 of 75

How do you rate limit per authenticated user instead of per IP with @nestjs/throttler?

Explanation

Many users behind one corporate NAT share an IP; per-user limits are fairer for authenticated APIs.

Further reading

Problem with a question

NestJS · Senior · question 72

Test yourself

Take the NestJS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz