From aef35142c59af0c7ff8806461138cf388a7cfb44 Mon Sep 17 00:00:00 2001 From: Tommaso Stocchi Date: Tue, 10 Feb 2026 14:07:05 +0100 Subject: [PATCH] Update dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../DevUIAggregatorHostedService.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs b/dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs index 0c93337c4f..ba8dc38db4 100644 --- a/dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs +++ b/dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs @@ -177,12 +177,10 @@ internal sealed class DevUIAggregatorHostedService : IAsyncDisposable } // SPA fallback: serve index.html for paths without a file extension (client-side routing) - if (!resourcePath.Contains('.', StringComparison.Ordinal)) + if (!resourcePath.Contains('.', StringComparison.Ordinal) && + await this.TryServeResourceAsync(context, "index.html").ConfigureAwait(false)) { - if (await this.TryServeResourceAsync(context, "index.html").ConfigureAwait(false)) - { - return; - } + return; } context.Response.StatusCode = StatusCodes.Status404NotFound;