FIle detail page

This commit is contained in:
2025-07-26 14:32:37 +08:00
parent f1867e7916
commit 186e9c00aa
14 changed files with 749 additions and 33 deletions

View File

@@ -13,6 +13,13 @@ public static class PageStartup
#pragma warning disable ASP0016
app.MapFallback(async context =>
{
if (context.Request.Path.StartsWithSegments("/api") || context.Request.Path.StartsWithSegments("/cgi"))
{
context.Response.StatusCode = StatusCodes.Status404NotFound;
await context.Response.WriteAsync("Not found");
return;
}
var html = await File.ReadAllTextAsync(defaultFile);
using var scope = app.Services.CreateScope();