diff --git a/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Program.cs b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Program.cs index 79e14dd..bf2d6a9 100644 --- a/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Program.cs +++ b/backend/LeedsBeerQuest.API/LeedsBeerQuest.API/Program.cs @@ -14,6 +14,8 @@ builder.Services.AddSwaggerGen(); // App services builder.Services.AddServiceDependencies(); +builder.Services.AddCors(); + var app = builder.Build(); @@ -28,6 +30,9 @@ if (app.Environment.IsDevelopment()) { app.UseSwagger(); app.UseSwaggerUI(); + + app.UseCors(options => + options.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); } app.UseHttpsRedirection();