Access-Control-Allow-Headers不允许请求标头字段Access-Control-Allow-Headers
我正在尝试使用发布请求将文件发送到服务器,但是在发送请求时会导致错误: Access-Control-Allow-Headers不允许请求标头字段Content-Type。 所以我搜索了错误并添加了标题: $http.post($rootScope.URL, {params: arguments}, {headers: { "Access-Control-Allow-Origin" : "*", "Access-Control-Allow-Methods" : "GET,POST,PUT,DELETE,OPTIONS", "Access-Control-Allow-Headers": "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With" } 然后我得到错误: Access-Control-Allow-Headers不允许请求标头字段Access-Control-Allow-Origin 所以我用谷歌搜索,唯一能找到的类似问题是半答案,然后关闭主题。我应该添加/删除哪些标题?