vue上传文件出现It does not have HTTP ok status

meikoul
  • 62

Access to XMLHttpRequest at 'XXcom/tie/upload' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
这是啥问题

评论
阅读 489
1 个回答

CORS 跨域后端没配好。

OPTIONS 预检请求后端应返回 2XX 状态码(也就是错误里最后说的 HTTP ok status)。

我估计是后端返回成 404 一类的了,改。

撰写回答

登录后参与交流、获取后续更新提醒

宣传栏