diff --git a/src/Aspire.Dashboard/DashboardWebApplication.cs b/src/Aspire.Dashboard/DashboardWebApplication.cs index 9847899035..cc2d6a1190 100644 --- a/src/Aspire.Dashboard/DashboardWebApplication.cs +++ b/src/Aspire.Dashboard/DashboardWebApplication.cs @@ -201,7 +201,10 @@ public DashboardWebApplication(Action? configureBuilder = else { _app.UseExceptionHandler("/Error"); - //_app.UseHsts(); + if (isAllHttps) + { + _app.UseHsts(); + } } _app.UseStatusCodePagesWithReExecute("/error/{0}");