`
xinghu
  • 浏览: 31666 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

crossdomain.xml 跨域访问xml时用到的文件

阅读更多

用fushioncharts 做了个,显示数据的饼状图,在本机测试良好,放到服务器上 挂了。看log,报错:

 

ActionController::RoutingError (No route matches "/crossdomain.xml" with {:method=>:get})
 

 

 

google,说跨域访问需要建一个crossdomin.xml 文件。(很奇怪,我的应用在一个站点内,怎么会跨域了呢)

 

先解决问题,在 /public 下新建一个 crossdomain.xml 文件,写入

 

<?xml version="1.0"?>
<!-- http://www.adobe.com/crossdomain.xml -->
<cross-domain-policy>
  <allow-access-from domain="*.com" />
</cross-domain-policy>

 

重启,OK

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics