Enable OPTIONS header for CORS on .NET Core Web API
I solved this problem after not finding the solution on Stackoverflow, so I am sharing my problem here and the solution in an answer. After enabling a cross domain policy in my .NET Core Web Api application with AddCors, it still does not work from browsers. This is because browsers, including Chrome and Firefox, will first send an OPTIONS request and my application just responds with 204 No Content. Niels Brinch Add a middleware class to your project to handle the OPTIONS verb. using System.Threading.Tasks; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; using Microsoft