ildar-shaymukhametov_grandnode-refactorings/Grand.Api/Infrastructure/Extensions/ServiceExtensions.cs
using Grand.Api.Constants;
using Microsoft.Extensions.DependencyInjection;

namespace Grand.Api.Infrastructure.Extensions
{
    public static class ServiceExtensions
    {
        public static void ConfigureCors(this IServiceCollection services)
        {
            services.AddCors(options =>
            {
                options.AddPolicy(Configurations.CorsPolicyName,
                    builder => builder.AllowAnyOrigin()
                    .AllowAnyMethod()
                    .AllowAnyHeader()
                    .AllowCredentials());
            });
        }
    }
}
