From 01c24ae987d2f5980eb9c84bb5786c1554ee2d35 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 16 Nov 2025 02:13:22 +0000 Subject: [PATCH] Do not redirect to HTTPS in development. --- Marechai.Server/Program.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Marechai.Server/Program.cs b/Marechai.Server/Program.cs index f0d32cb7..47a504d9 100644 --- a/Marechai.Server/Program.cs +++ b/Marechai.Server/Program.cs @@ -257,7 +257,8 @@ file class Program // Configure the HTTP request pipeline. if(app.Environment.IsDevelopment()) app.MapOpenApi(); - app.UseHttpsRedirection(); + // Only redirect to HTTPS in production + if(!app.Environment.IsDevelopment()) app.UseHttpsRedirection(); // Use CORS before authentication/authorization app.UseCors("AllowFrontend");