Kimblis
Kimblis2y 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
Nick2y 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.2y 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...

Did you find this page helpful?