using NeDvachAPI.BufferControllers;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddControllers();
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddCors(setup =>
{
setup.AddDefaultPolicy(policyBuilder =>
//policyBuilder.WithOrigins("http://www.vdk2ch.ru:4200").WithMethods("GET", "POST").WithHeaders("*");
policyBuilder.WithOrigins("http://localhost:4200").WithMethods("GET", "POST").WithHeaders("*");
});
var app = builder.Build();
if (app.Environment.IsDevelopment())
}
app.UseCors();
app.UseAuthorization();
app.MapControllers();
if (BufferFill.FillBuffer("b"))
app.Run();