From 0cf1d8ad95477959647fdfb87b7d7a6d8875cebe Mon Sep 17 00:00:00 2001 From: LD-Reborn Date: Sat, 18 Oct 2025 23:56:40 +0200 Subject: [PATCH] Fixed navbar twitching, added file types to request cache --- src/Program.cs | 2 +- src/Views/Shared/_Layout.cshtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Program.cs b/src/Program.cs index 7d4a7dd..240cd7c 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -94,7 +94,7 @@ app.UseStaticFiles(new StaticFileOptions OnPrepareResponse = ctx => { string requestPath = ctx.Context.Request.Path.ToString(); - if (requestPath.EndsWith(".css") || requestPath.EndsWith(".js")) + if (requestPath.EndsWith(".css") || requestPath.EndsWith(".js") || requestPath.EndsWith(".png") || requestPath.EndsWith(".ico")) { ctx.Context.Response.GetTypedHeaders().CacheControl = new Microsoft.Net.Http.Headers.CacheControlHeaderValue() diff --git a/src/Views/Shared/_Layout.cshtml b/src/Views/Shared/_Layout.cshtml index 24f8a45..80c3a21 100644 --- a/src/Views/Shared/_Layout.cshtml +++ b/src/Views/Shared/_Layout.cshtml @@ -23,7 +23,7 @@