Cors
No edit summary
No edit summary
Line 10: Line 10:
     </httpProtocol>     
     </httpProtocol>     
   </system.webServer>   
   </system.webServer>   
  </configuration></pre>To do this on App level - change Web.config
  </configuration></pre>To do this on App level - change Web.config in the same way - but beware that web-config is part of installation and will be replaced on update.


Good links: https://www.w3.org/wiki/CORS_Enabled https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api
Good links: https://www.w3.org/wiki/CORS_Enabled https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api

Revision as of 19:06, 11 September 2020

To enable cors on IIS - all sites on the machine:

Add a or change web.config on the root web site (Default Web 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>

To do this on App level - change Web.config in the same way - but beware that web-config is part of installation and will be replaced on update.

Good links: https://www.w3.org/wiki/CORS_Enabled https://docs.microsoft.com/en-us/aspnet/web-api/overview/security/enabling-cross-origin-requests-in-web-api

This page was edited 40 days ago on 03/26/2024. What links here