react fetch 跨域问题?

图片描述

错误信息如上。
报错信息:
Fetch API cannot load http://192.168.10.5:9001/WF/W... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:9001' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

阅读 8.6k
3 个回答

服务端安装cors插件

npm i --save cors

ajax请求不能跨域,我这边是用nginx反向代理解决的

推荐问题
宣传栏