调用其他服务器的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,当页面控制台中出现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.打开桌面上的谷歌浏览器快捷方式出现如下图则成功
相关文章推荐
- 小心服务器内存居高不下的元凶--WebAPI服务
- Android Manifest 用法
- Spark RDD API详解(一) Map和Reduce
- 运维入门
- Linux5.9无人值守安装
- 数据中心和云未来的十二大趋势
- 用vsftp快速搭建ftp服务器
- Linux快速构建apache web服务器
- 服务器监控策略浅谈
- 如何降低服务器采购成本 原理分析
- 建议的服务器分区办法
- 服务器托管六大优势分析
- 一个小型js框架myJSFrame附API使用帮助
- Erlang实现的一个Web服务器代码实例
- 服务器技术全面解析
- 保护DNS服务器的几点方法小结
- 我国成为全球第二大服务器消费国
- 服务器 安全检查要点[星外提供]
- 详细分析交换机、路由器、集线器的区别和联系