Lesson 33 / 34
Rate Limiting
Protect your API from abuse with @nestjs/throttler and the @Throttle decorator per route or globally.
Throttle decorator
Use @Throttle() guard to limit requests per time window.
import { Throttle } from '@nestjs/throttler';
@Throttle({ default: { limit: 10, ttl: 60000 } }) // 10 requests per minute
@Get()
findAll() { ... }