Do not redirect to HTTPS in development.

This commit is contained in:
2025-11-16 02:13:22 +00:00
parent a60fb39687
commit 01c24ae987

View File

@@ -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");