您的位置:首页 > 产品设计 > UI/UE

调用其他服务器的api时,暂时处理跨域问题的方法——No 'Access-Control-Allow-Origin' header is present on the requested resour

2015-11-02 09:58 926 查看
一:应用场景

调别人服务器的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.打开桌面上的谷歌浏览器快捷方式出现如下图则成功

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  api 服务器 跨域问题