I have a .net core app which has a REST API being used by an angular client but running into CORS issue.
In the .net core, I already have
app.UseCors();
in the configure method as well as has set the response headers to
Access-Control-Allow-Headers *
Access-Control-Allow-Methods *
Access-Control-Allow-Origin *
but still getting the error in the client (running on port 4200 locally):
Access to XMLHttpRequest at 'http://localhost/myAPI/api/Table' from origin 'http://localhost:4200' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.