config: Allow all origins in CORS policy and disable HTTPS redirection.
Build & Push Hospitality / build-and-push (push) Failing after 2m4s

This commit is contained in:
steinhelge
2025-11-26 12:07:31 +01:00
parent dcc8e10bd2
commit d1568c788a
+2 -9
View File
@@ -65,17 +65,10 @@ builder.Services.AddScoped<ITransactionService, TransactionService>();
// Add CORS
builder.Services.AddCors(options =>
{
options.AddPolicy("AllowFrontend", policy =>
{
policy.WithOrigins(
"http://localhost:5173",
"https://hospitality-dev.theriise.net",
"https://hospitality.theriise.net"
)
policy.SetIsOriginAllowed(origin => true) // Allow any origin
.AllowAnyHeader()
.AllowAnyMethod();
});
});
var app = builder.Build();
@@ -101,7 +94,7 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
// app.UseHttpsRedirection(); // Disabled because Traefik handles SSL
app.UseCors("AllowFrontend");