Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
efraimbart opened this issue Feb 3, 2023 · 0 comments

Comments

@efraimbart
Copy link

efraimbart commented Feb 3, 2023

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 efraimbart changed the title A post method using the server middleware at the same path as a get method that serves up a page causes 405 error.A post method using the server middleware at the same path as a get method that serves up a page causes 405 error. A post method using the server middleware at the same path as a get method that serves up a page causes 405 error. Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant