From ee0f8e2906445c0c55c825f82cfaa80fc3d93f6a Mon Sep 17 00:00:00 2001 From: CWX Date: Fri, 28 Feb 2025 18:37:26 +0000 Subject: [PATCH] Fix images not working, using MapFallback had further unwanted changes --- Libraries/Core/Servers/HttpServer.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Libraries/Core/Servers/HttpServer.cs b/Libraries/Core/Servers/HttpServer.cs index f745bf61..23ef0cb5 100644 --- a/Libraries/Core/Servers/HttpServer.cs +++ b/Libraries/Core/Servers/HttpServer.cs @@ -61,7 +61,12 @@ public class HttpServer( KeepAliveInterval = TimeSpan.FromSeconds(60) }); - app.MapFallback(HandleFallback); + app?.Use( + (HttpContext req, RequestDelegate _) => + { + return Task.Factory.StartNew(async () => await HandleFallback(req)); + } + ); _started = true;