How to enable CORS on IIS Manager of Windows 10?

I've created an HTTPS server using IIS Manager (Windows 10). Now, I want this server to support CORS requests.

I've read some information. For example, this link says that I have to create a file web.config in the directory. Unfortunately, it didn't work out. This link says that I should edit some config files, but I don't find them on my machine.


I had a similar issue recently. Most tutorial/documentation only suggests adding custom headers in the configuration. But this does not tell IIS to handle the CORS Pre-flight request by itself.

To do so, you must install the CORS Module in IIS and add some configuration in the web.config file, as explained here: IIS CORS module Configuration Reference

I recently used this to Reverse Proxy to a REST API and handling the CORS only in IIS so that I don't have to rebuild my project to change CORS settings.