mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 15:01:56 +00:00
Added user photo caching
This commit is contained in:
@@ -102,11 +102,20 @@ app.UseStaticFiles(new StaticFileOptions
|
||||
Public = true,
|
||||
MaxAge = TimeSpan.FromDays(365)
|
||||
};
|
||||
} else if (requestPath.Contains("UserPhoto"))
|
||||
{
|
||||
ctx.Context.Response.GetTypedHeaders().CacheControl =
|
||||
new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
|
||||
{
|
||||
Public = true,
|
||||
MaxAge = TimeSpan.FromMinutes(5)
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
app.UseRouting();
|
||||
app.UseAuthorization();
|
||||
app.UseResponseCaching();
|
||||
app.UseResponseCompression();
|
||||
|
||||
string[] supportedCultures = ["de", "en"];
|
||||
|
||||
Reference in New Issue
Block a user