diff --git a/src/Hospitality.Backend/Program.cs b/src/Hospitality.Backend/Program.cs index 6b45e09..89632c9 100644 --- a/src/Hospitality.Backend/Program.cs +++ b/src/Hospitality.Backend/Program.cs @@ -65,16 +65,9 @@ builder.Services.AddScoped(); // Add CORS builder.Services.AddCors(options => { - options.AddPolicy("AllowFrontend", policy => - { - policy.WithOrigins( - "http://localhost:5173", - "https://hospitality-dev.theriise.net", - "https://hospitality.theriise.net" - ) - .AllowAnyHeader() - .AllowAnyMethod(); - }); + policy.SetIsOriginAllowed(origin => true) // Allow any origin + .AllowAnyHeader() + .AllowAnyMethod(); }); @@ -101,7 +94,7 @@ if (app.Environment.IsDevelopment()) app.UseSwaggerUI(); } -app.UseHttpsRedirection(); +// app.UseHttpsRedirection(); // Disabled because Traefik handles SSL app.UseCors("AllowFrontend");