How to read nextjs server action function name and parameters in middleware? #68561
-
|
When server actions are called, they manifest as a POST request from the user's current route. I'm trying to get information about the function name and params in middleware When I inspect request, I find no references to the function name or the params passed, but i'm only crudely inspecting and haven't ruled out serialization. Is there a way to view the server action's function name and parameters that called the POST route? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
I'm afraid no. Next.js identifies the server action through the |
Beta Was this translation helpful? Give feedback.
I'm afraid no.
Next.js identifies the server action through the
Next-Actionheader. You can see a demonstration in this Youtube video: https://youtu.be/mwNZ34sxIGw?t=293