79528761

Date: 2025-03-23 10:07:34
Score: 1
Natty:
Report link

The solution was setting ServeUnknownFileTypes to true, like so:

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.UseStaticFiles(new StaticFileOptions {ServeUnknownFileTypes = true});
app.MapFallbackToFile("index.html");

app.Run();
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Jasper