Tuesday, July 14, 2020
0 comments

CORS on IIS7 Adding required headers for underlying CORS handling

2:11 PM
For Microsoft IIS7, merge this into the web.config file at the root of your application or site:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <system.webServer>
   <httpProtocol>
     <customHeaders>
       <add name="Access-Control-Allow-Origin" value="*" />
     </customHeaders>
   </httpProtocol>
 </system.webServer>
</configuration>
If you don't have a web.config file already, or don't know what one is, just create a new file called web.config containing the snippet above.

0 comments:

Featured Post

Enterprise ASP.NET Core Web API with Clean Architecture

  Enterprise ASP.NET Core Web API with Clean Architecture I'll create a comprehensive solution for your requirements, focusing on scalab...

 
Toggle Footer
Top