2
我使用AngularJS做这样的请求:AngularJS:HTTP缺少头请求
var config = { headers: {
'Authorization': 'somehash',
'Content-Type': 'application/json; charset=UTF-8'
} };
$http.get('http://example.com', config)
.then(function(response) {
$scope.response = response;
}, function(response) { });
请求被解雇,但是当我检查在Firefox(萤火虫)的请求缺少授权的/ Content-Type头文件我已经设置,它返回与CORS相关的“200选项请求”。无论如何,我想知道这个问题是否真的与CORS相关或丢失了标题,并且在某种情况下或另一种情况下是什么解决方案。
在OPTIONS之后必须发送一个GET请求:请求是否提供了标题? – sp00m