项目我用的1.2.30版本的angular,在谷歌火狐等现代浏览器中跨域post到服务器上返回的没问题,但是到IE9下就有问题了,返回error且打印的:{description: "拒绝访问。 ", message: "拒绝访问。 ", name: "Error", number: -2147024891}
加了headers头也不见效
$http({
url: $scope.ApiUrl,
method:'POST',
headers: {
'Content-Type' : 'application/x-www-form-urlencoded'
},
data: param({app:'Cas','class':'GetRegion', sign:$scope.signMD5('Cas','GetRegion'), region_id: id})
})
.success(function (response){
if(!swith) {
vm.countries = response.data.data
} else {
console.log('no');
}
})
.error(function (response){
console.log(response)
})