diff options
-rw-r--r-- | backend/api/api/Program.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/backend/api/api/Program.cs b/backend/api/api/Program.cs index 478b7052..84514972 100644 --- a/backend/api/api/Program.cs +++ b/backend/api/api/Program.cs @@ -1,11 +1,22 @@ var builder = WebApplication.CreateBuilder(args); -// Add services to the container. +//Add Cors +builder.Services.AddCors(); + +// Add services to the container builder.Services.AddControllers(); var app = builder.Build(); + +//Add Cors +app.UseCors( + x=>x.AllowAnyOrigin() + .AllowAnyMethod() + .AllowAnyHeader() + ); + // Configure the HTTP request pipeline. app.UseAuthorization(); |