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
fl0w5mo 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 Izan5mo ago
yeah I tried that but I believe both pages router and app router use different request and response apis
KO
KO5mo 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 Izan5mo ago
ty, will take a look later!
fl0w
fl0w5mo ago
should still work imo
No description
Want results from more Discord servers?
Add your server
More Posts
Keeping references to processes in nextjsHey, im trying the t3 stack and i have a quetions about nextjs in general. So the issue is that on Cannot update a component HotReload while rendering a differenet componentI try to call a server action from a client component, and I get this error for some reason anyone kUnderstanding serverside validation with zod and nextjs server actions???Hey y'all Im trying to implement zod into my validation for a form and i want to validate on a serveUpdate local data from useQueryam using trpc to make a query to load recipe information in my nextjs application: `const { data, iVercel stream keep alive???I just found this git repo for publishing messages with NextJS and Upstash and I got some questions.Where to suggest stream topicsIs there somewhere Theo likes to take suggestions for video/stream topics? I'm curious what people Nextjs SEO and Google Rank advice...Hi guys, so I'm trying to learn how the Google Rank work. I'm working on a big ecommerce site, andTheo uses api.posts.getAll.useQuery() in T3 tutorial video, but T3 app only has .query() calls.Where did Theo got .useQuery() methods? I only have .query() https://youtu.be/YkOSUVzOAA4?t=2211`tsx ./src/server/db/SCRIPT_NAME` doesn't recognize environment variables.I created a db migrator script similar to the recommendations here: https://create.t3.gg/en/usage/prHow can I specify a `callbackUrl` when using the default NextAuth setup?I'm using the default NextAuth setup (going to /api/auth/signin to get users to sign in), and I want