Public caching causes an issue with cache validation on browser causing images not to be cached correctly. Made private to ensure we get proper images each load.

This commit is contained in:
Joseph Milazzo 2021-03-12 18:35:12 -06:00
parent 1f24725905
commit 52b91a9b92
4 changed files with 4 additions and 10 deletions

View file

@ -105,11 +105,11 @@ namespace API
context.Response.GetTypedHeaders().CacheControl =
new Microsoft.Net.Http.Headers.CacheControlHeaderValue()
{
Public = true,
Public = false,
MaxAge = TimeSpan.FromSeconds(10)
};
// context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.Vary] =
// new string[] { "Accept-Encoding" };
context.Response.Headers[Microsoft.Net.Http.Headers.HeaderNames.Vary] =
new string[] { "Accept-Encoding" };
await next();
});