Esempio n. 1
0
 private static void ConfigureCors(Microsoft.AspNetCore.Cors.Infrastructure.CorsOptions options)
 {
     options.AddPolicy(defaultName, policy =>
                       policy.AllowAnyHeader()
                       .AllowAnyMethod()
                       .AllowAnyOrigin()
                       .AllowCredentials());
 }
Esempio n. 2
0
 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");
     });
 }