Kimblis
Kimblis14mo ago

RateLimiter for fastify tRPC routes

Hi, I would like to add Ratelimiter to a specific fastify trpc route, are there any solutions available yet? Or do we need to write our own solution for this?
2 Replies
Nick
Nick14mo ago
tRPC has middlewares so you can implement one yourself via that Though if fastify itself has features for this there's nothing stopping you using it
abdissalam.
abdissalam.14mo ago
Maybe you can use this package https://github.com/OrJDev/trpc-limiter
GitHub
GitHub - OrJDev/trpc-limiter: Open Source Rate Limiter Middleware F...
Open Source Rate Limiter Middleware For tRPC. Supporting Upstash, Memory Store And Much More - GitHub - OrJDev/trpc-limiter: Open Source Rate Limiter Middleware For tRPC. Supporting Upstash, Memory...