Next.js Discord

Discord Forum

Nextjs server actions method not allowed

Answered
"use php" posted this in #help-forum
Open in Discord
I'm getting method not allowed error when I'm using server actions.

I'm only getting in production & when I run the server locally.
Answered by "use php"
So, I basically need to set runtime of layout.tsx as edge to fix.
View full answer

4 Replies

I'm Trying to execute a server action from client side and I'm getting this error. It works fine in development, but in production & local build I get this error Method not allowed
I'm still trying some solutions
So, I basically need to set runtime of layout.tsx as edge to fix.
Answer