<system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> <add name="Access-Control-Allow-Headers" value="Content-Type" /> <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" /> </customHeaders> </httpProtocol> </system.webServer>
在Web.config文件在对应位置添加上以上配置代码就可以实现跨域配置
原文地址:https://www.cnblogs.com/oumi/p/10218078.html
时间: 2024-10-01 20:22:46