how do I rate limit on nextjs api routes on app router?

hey, currently using Route Handlers and I'm stuck on adding a rate limiter to my routes. How can I do so?
Routing: Route Handlers | Next.js
Create custom request handlers for a given route using the Web's Request and Response APIs.
5 Replies
fl0w
fl0w10mo ago
GitHub
next.js/examples/api-routes-rate-limit at canary · vercel/next.js
The React Framework. Contribute to vercel/next.js development by creating an account on GitHub.
Sr Izan
Sr Izan10mo ago
yeah I tried that but I believe both pages router and app router use different request and response apis
KO
KO10mo ago
Teo uses Upstash ratelimiter https://youtu.be/YkOSUVzOAA4?t=5889
Theo - t3․gg
YouTube
T3 Stack Tutorial - FROM 0 TO PROD FOR $0 (Next.js, tRPC, TypeScrip...
I've never worked this hard on a video before. I really hope y'all can benefit from this 🙏 GITHUB REPO https://github.com/t3dotgg/chirp DEPLOYED APP https://xn--uo8h.t3.gg/ GET A JACKET IF YOU'RE COOL LIKE THAT https://shop.t3.gg/ ALL MY VIDEOS ARE POSTED EARLY ON PATREON https://www.patreon.com/t3dotgg Everything else (Twitch, Twitter, Discor...
Sr Izan
Sr Izan10mo ago
ty, will take a look later!
fl0w
fl0w10mo ago
should still work imo
No description
Want results from more Discord servers?
Add your server