Fixed navbar twitching, added file types to request cache

This commit is contained in:
2025-10-18 23:56:40 +02:00
parent 89f54a2671
commit 0cf1d8ad95
2 changed files with 2 additions and 2 deletions

View File

@@ -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()