Skip to main content

Enable CORS on Windows Hosting

Would you like to enable CORS (Cross-Origin Resource Sharing) on your Windows IIS hosting

Updated over a week ago

Would you like to enable CORS (Cross-Origin Resource Sharing) on your Windows IIS hosting?


You can easily do this via your web.config file.

If the web.config file does not exist yet, you need to create it first.

Example of a new configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Did this answer your question?