在被请求页解决Jquery Ajax 跨域
在web.config修改如下节点:<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="POST,GET,DELETE,PUT,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="X-Requested-With" />
</customHeaders>
</httpProtocol>
</system.webServer>
文档来源:51CTO技术博客https://blog.51cto.com/iteyer/3235454
页:
[1]