Config
Rate Limiter
Stop brute-force attacks and abuse with rate limiting.
Rate limiting is a powerful feature that helps protect your API from abuse and brute-force attacks. It allows you to limit the number of requests a client can make within a specified time frame.
Usage
export const vitNodeApiConfig = buildApiConfig({
rateLimiter: {
points: 40,
duration: 60,
},
});
Options
Prop | Type | Default |
---|---|---|
blockDuration? | number | 0 |
execEvenlyMinDelayMs? | number | duration * 1000 / points |
execEvenly? | boolean | false |
duration? | number | 60 |
points? | number | 80 (120 in dev) |