Hi,@Ian Dudley
You can try to do like this
services.AddCors(options => options.AddPolicy("CorsPolicy", builder =>
{
builder
.WithOrigins("http://localhost:4200")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials()
.SetPreflightMaxAge(TimeSpan.FromSeconds(2520));
}));
And make sure the order you used app.UseCors("CorsPolicy");
is right,you can refer to the order in the official document
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yiyi You-MSFT