0
我在Chrome中创建了一个AJAX XD请求,调用完成得很好,一切正常,响应我可以获取HTTP标头,但在Firefox中,我不能。我已经声明了所有的起始标头等等。Jquery ajax请求不允许在Firefox上获取响应标头
有人可以帮忙吗?
$.ajax({
url: 'myurl',
type: "POST",
cache: false,
dataType: "text",
crossDomain: true,
async: true,
xhrFields: {
withCredentials: false
}
})
.done(function(value, type, obj) {
console.log('success', arguments, obj.getAllResponseHeaders());
});
On server it's defined the headers:
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Allow-Origin: _URL_');
header('Access-Control-Expose-Headers: some_id,Content-Range');