mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 15:01:56 +00:00
Fixed navbar twitching, added file types to request cache
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user