Update dotnet/aspire-integration/Aspire.Hosting.AgentFramework.DevUI/DevUIAggregatorHostedService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Tommaso Stocchi
2026-02-10 14:07:05 +01:00
committed by GitHub
Unverified
parent caab54f7f0
commit aef35142c5
@@ -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;