diff --git a/src/NuGet.Next/Program.cs b/src/NuGet.Next/Program.cs index 7715938..a17500e 100644 --- a/src/NuGet.Next/Program.cs +++ b/src/NuGet.Next/Program.cs @@ -64,9 +64,20 @@ app.Use((async (context, next) => { + if (context.Request.Path == "/") + { + if (info.Exists) + { + await context.Response.SendFileAsync(Path.Combine("wwwroot", "index.html")); + } + + return; + } + await next(context); - if (context.Response.StatusCode == 404) + if (context.Response.StatusCode == 404 && context.Request.Path.StartsWithSegments("/v3") && + context.Request.Path.StartsWithSegments("/api")) { context.Response.StatusCode = 200;