vercel-builder icon indicating copy to clipboard operation
vercel-builder copied to clipboard

A post method using the server middleware at the same path as a get method that serves up a page causes 405 error.

Open efraimbart opened this issue 3 years ago • 0 comments

When running Nuxt regularly you can have a page and a server middleware post method on the same path, but when deploying on Vercel using this builder it seem that the paths get hijacked and can no longer be used for server middleware, instead returning a 405 error.

For example, on this site I have a submit.vue page, and therefore, in order to get my post submit endpoint to work I had to update it to submitPost as seen here.

Is this the intended behavior?

efraimbart avatar Feb 03 '23 01:02 efraimbart