Next.js Discord

Discord Forum

Combining KV Rate Limiting With Clerk Middleware

Unanswered
Cuvier’s Dwarf Caiman posted this in #help-forum
Open in Discord
Cuvier’s Dwarf CaimanOP
Hi there, I’ve implemented authenticated rate limiting on my api routes inside the route itself but I want to add Edge rate limiting with Vercel’s KV solution https://vercel.com/guides/rate-limiting-edge-middleware-vercel-kv.

I’m stuck on how to combine this middleware file with the clerk middleware file in a safe and effective way that doesn’t compromise the use of either. Can anyone help out ?

0 Replies