Does anyone have experience of anonymous authentication and windows authentication with Web Api Core and CORS? Essentially I need Windows Authentication enabled, however when I do so CORS requests to PUT and POST fail due to the preflight request being rejected. I have enabled CORS properly using the below code but nothing seems to work.
services.AddCors(options =>
{
options.AddPolicy("CorsPolicy",
builder => builder.WithOrigins(new string[] { "http://localhost:3000" })
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials());
});
The below question is exactly my situation but has an accepted answer which both doesn't work and has incorrect config data. Angular4 ASP.NET Core 1.2 Windows Authentication CORS for PUT and POST Gives 401