0
我正在尝试从跨域URL加载数据点。不幸的是我无法得到这个工作。据我所知,我已经建立了我的Apache Linux服务器来支持CORS。我添加了以下配置文件头:Sencha Touch - 跨域(CORS)问题
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "GET,POST"
Header set Access-Control-Allow-Headers "X-Requested-With"
这是我店里的当前设置:
var myStore = Ext.create('Ext.data.Store',
{
fields: [{name: 'xTime', type: 'int'}, {name: 'yData', type: 'float'}, {name: 'target', type: 'string'}],
proxy:
{
type: 'ajax',
url: 'http://test.com/datapoints.json',
useDefaultXhrHeader: false,
reader: 'points'
},
autoLoad: true
});
我只是试图找到我缺少什么吗?我正在使用Safari测试它,到目前为止,我仍然收到“Access-Control-Allow-Origin”错误。
任何帮助将不胜感激!