We are integrating with a closed source API running on IIS server V10. At first, all of the requests from our frontend(ReactJS) were blocked by cors. We've added the following custom headers in IIS configurations to allow cors:
Access-Control-Allow-Origin: <IP:PORT>
Access-Control-Allow-Methods: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Headers: *
Now all the request works fine except for the preflight requests which gives a 404 response with a message Access to XMLHttpRequest from origin has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status
.
We've tried to install IIS cors module using this guide but it gives 500 server error