#Config Fastify Route in NestJS

1 messages · Page 1 of 1 (latest)

wraith musk
hot nova
#

Nope. Doesn't exist

wraith musk
#

So it's even not exposed? I can't configure it?

hot nova
#

Nope. What configuration are you wanting to add?

wraith musk
#
// add a limited route with this configuration plus the global one
fastify.get('/', {
  config: {
    rateLimit: {
      max: 3,
      timeWindow: '1 minute'
    }
  }
}, (request, reply) => {
  reply.send({ hello: 'from ... root' })
})
hot nova
#

There's @nestjs/throttler if you need something for rate limiting