【IIS】跨域(转)

Access to XMLHttpRequest at 'http://*****/.dae' from origin 'http://192.168.198.21:22222' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

设置Access-Control-Allow-Origin

打开IIS,找到“HTTP响应标头”点进去,

在右侧可以看到添加,然后添加如下标头即可

Access-Control-Allow-Headers:Content-Type, api_key, Authorization

Access-Control-Allow-Origin:*

原文地址:https://www.cnblogs.com/defineconst/p/10794907.html