private static void ConfigureCors(Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions options) { options.AddPolicy(defaultName, policy => policy.AllowAnyHeader() .AllowAnyMethod() .AllowAnyOrigin() .AllowCredentials()); }
private void AddCorsPolicy(Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions options) { options.AddPolicy("default", policy => { policy.WithOrigins( Configuration.GetValue <string>(Config.JsClientUrl)) .AllowAnyHeader() .AllowAnyMethod() .WithExposedHeaders("Content-Disposition"); }); }