-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[Bug] 在 Vercel 使用 apiRouter 时,POST 请求会报 405 错误 #12325
Labels
Comments
你发现了一个隐藏的功能,umi 4 以前做的这个兼容 vercel api router 的功能,太老了,而且几乎 0 人知道 0 人使用,加上 vercel 现在 api 的约定可能也发生了一些变化,所以到现在为止它不可用了也是正常的。 现在如果要用 vercel api ,最好自己根据 vercel api 的文档去编写和部署;不要用 umi 内置这个功能了,因为几乎没人用,也比不过 nextjs ,目测它的意义不大了。 如果有兴趣希望修订这部分让它重新可用,欢迎 PR 修复,代码路径在 |
绕过方案: 将 API 路由的构建产物一并提交到 Git。Ref: umijs/umi-blog-example#11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在 Vercel 使用 apiRouter 时,POST 请求会报 405 错误
我在 使用 umi 的apiRoute,按照 umi blog 的方式实现了对应的功能,包括用户登陆、查询用户信息等。使用的是 POST 请求,MySQL 数据库,在本地调试运行良好,当部署到 Vercel 后,报 405 错误。
尝试地址
obde
用户名和密码随便填
配置信息
版本信息
The text was updated successfully, but these errors were encountered: