From 085aa5a89f1b4d24b9f498a3501c9955a2f30c65 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Wed, 31 Jan 2024 00:57:35 -0800 Subject: [PATCH] Use the slim builder to avoid loading static assets - We're exposing a simple gRPC endpoint for the dashboard to talk to. We can avoid loading static assets completely (which causes all kinds of problems when things get out of sync). Fixes #2012 --- src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs b/src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs index 9626817c5c..296df1a6e5 100644 --- a/src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs +++ b/src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs @@ -66,7 +66,10 @@ public DashboardServiceHost( try { - var builder = WebApplication.CreateBuilder(); + var builder = WebApplication.CreateSlimBuilder(); + + // Turn on HTTPS + builder.WebHost.UseKestrelHttpsConfiguration(); // Environment builder.Services.AddSingleton();