Next.js Discord

Discord Forum

Vercel WFA and Server Actions

Unanswered
Golden northern bumble bee posted this in #help-forum
Open in Discord
Golden northern bumble beeOP
Hi all - has anyone tried using the newly released WFA from Vercel for rate limiting nextjs server actions?

I’m trying to understand how to target the server actions in the rule configuration.

I was thinking some checks would be:

- Request method is POST
- Request path is page the action is used on

However, this is not specific enough and would target whatever actions run on a certain page, not the action themselves.

Say I want to rate limit all my auth server actions a certain way - how do I do that? What’s the approach?

With API routes it’s easier because the path would be /api/auth and you can just check if pattern matches that.

Any help is appreciated, thanks!

1 Reply

Golden northern bumble beeOP
Bump