我在生产中遇到错误,无法弄清原因。
The website I'm working on is a new project http://basefounder.com.
我提供了一项服务,以收集想要更新邮件列表的人。
当我通过桌面浏览器使用该网站时,可以毫无问题地添加电子邮件,但是当我尝试通过移动浏览器进行电子邮件访问时,出现以下错误。
{
"headers": {
"normalizedNames": {},
"lazyUpdate": null,
"headers": {}
},
"status": 0,
"statusText": "Unknown Error",
"url": "http://localhost:4040/api/user/email",
"ok": false,
"name": "HttpErrorResponse",
"message": "Http failure response for http://localhost:4040/api/user/email: 0 Unknown Error",
"error": {
"isTrusted": true
}
}
为了帮助在生产环境中进行调试,我在加入邮件列表按钮正下方的FE页面中添加了从Node服务器收到的错误。
希望有人有任何想法,如果您需要更多信息,请问我,我会提供。
我不认为这是CORS的问题,因为在桌面浏览器中我可以毫无问题地做到这一点。
谢谢 多梅尼科
看来您是从生产前端向开发后端URL发出HTTP请求。尝试从桌面浏览器(Firefox)添加电子邮件时收到相同的错误
检查您是否已在Angular应用程序中正确配置了URL。
Also it's an OPTIONS request, which most probably mean it's a preflight request due to CORS.