Next.js Discord

Discord Forum

server action rate limiting

Unanswered
Black carp posted this in #help-forum
Open in Discord
Black carpOP
does the rate limiting each server action is necessary ?

Although it could be done in middleare, but some time different business logic need different rate limiting time.

what will be the best practice to apply the rate limiting each server action?

6 Replies

server actions are just syntactic sugar for public api routes
and must be treated as any other normal endpoint
Black carpOP
Thank you guys for the reply, I have done that in middleware for all the server actions.
Black carpOP
yes, upstash for now .