【发布时间】:2018-04-23 21:02:21
【问题描述】:
我正在尝试调用我的 Azure 函数,但失败了:
$http.post(url, {data: data, headers: headers})
.success(function (jSendResponse, status, headers) {
console.warn("worked");
})
.error(function (errResponse) {
console.warn('failed')
});
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<Origin domain>' is therefore not allowed access. The response had HTTP status code 400.
我已更改此特定 Azure 功能的 CORS 设置。首先通过指定我的确切域。然后在允许的来源列表中添加* 作为最后一个条目。
但错误信息仍然存在。
我做错了什么?
【问题讨论】:
标签: angularjs cors azure-functions