put back cors, apparently it's still necessary, sigh

This commit is contained in:
ig 2023-03-20 15:17:52 +01:00
parent 19633ec54f
commit 28a0ef5530
1 changed files with 1 additions and 6 deletions

View File

@ -10,10 +10,6 @@ public static class Program
var builder = WebApplication.CreateBuilder(args);
//builder.Services.AddHttpContextAccessor();
//builder.Services.AddEndpointsApiExplorer();
//builder.Services.AddCors(o => o.AddDefaultPolicy(p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()));
builder.Services.AddControllers();
builder.Services.AddSwaggerGen(c =>
{
@ -30,9 +26,8 @@ public static class Program
app.UseSwaggerUI();
}
//app.UseCors(p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()) ;
app.UseCors(p => p.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod()) ;
app.UseHttpsRedirection();
//app.UseAuthorization();
app.MapControllers();
app.Run();