feat: stricter rate limit
This commit is contained in:
parent
290a13cc31
commit
4b46ba1ec3
1 changed files with 2 additions and 2 deletions
|
@ -10,13 +10,13 @@ const app = Fastify({ logger: true })
|
||||||
await app.register(import('@fastify/rate-limit'), {
|
await app.register(import('@fastify/rate-limit'), {
|
||||||
global: true,
|
global: true,
|
||||||
max: 25,
|
max: 25,
|
||||||
timeWindow: 1000 * 60,
|
timeWindow: 1000,
|
||||||
})
|
})
|
||||||
|
|
||||||
await app.setNotFoundHandler(
|
await app.setNotFoundHandler(
|
||||||
{
|
{
|
||||||
preHandler: app.rateLimit({
|
preHandler: app.rateLimit({
|
||||||
max: 100,
|
max: 10,
|
||||||
timeWindow: 1000,
|
timeWindow: 1000,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue