I am trying to enable cross origin resources sharing on my ASP.NET Core Web API, but I am stuck.
The EnableCors attribute accepts policyName
EnableCors
policyName
You have to configure in Startup.cs class
services.AddCors(options => { options.AddPolicy("CorsPolicy", builder => builder.AllowAnyOrigin() .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials()); });