.htaccess添加下面代码:
<IfModule mod_headers.c> Header add Access-Control-Allow-Origin "*" </IfModule>
web.config设置下面代码:
.... <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> ....
时间: 2024-11-05 15:57:13