一:应用场景
调别人服务器的api,当页面控制台中出现No 'Access-Control-Allow-Origin' header is present on the requestedresource. Origin 'http://127.0.0.1:8020' is therefore not allowed access. Theresponse had HTTP status code 404时使用
二:解决方法
1.安装谷歌浏览器
2.右击桌面上的谷歌浏览器快捷方式,选择“属性”
3.选择“快捷方式”,在目标一栏最后添加--disable-web-security,并点击确定 如下图:
4.打开桌面上的谷歌浏览器快捷方式出现如下图则成功