From 28a0ef55300d3e1795f315d03c652dd1b1f414ce Mon Sep 17 00:00:00 2001 From: ig Date: Mon, 20 Mar 2023 15:17:52 +0100 Subject: [PATCH] put back cors, apparently it's still necessary, sigh --- csharp/App/Backend/Program.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/csharp/App/Backend/Program.cs b/csharp/App/Backend/Program.cs index 385c6250b..39c324dc8 100644 --- a/csharp/App/Backend/Program.cs +++ b/csharp/App/Backend/Program.cs @@ -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();