When a website has the following code to override the Cache Control header, then the end point for the JS and CSS files for the admin interface throws a 500 error:
app.UseResponseCaching();
app.Use(async (context, next) =>
{
if (context.Request is not null)
{
if (context.Response.Headers.ContainsKey(HeaderNames.CacheControl))
{
context.Response.Headers[HeaderNames.CacheControl] = "no-cache, max-age=0";
}
else
{
context.Response.Headers.Add(HeaderNames.CacheControl, "no-cache, max-age=0");
}
}
await next();
});
When a website has the following code to override the Cache Control header, then the end point for the JS and CSS files for the admin interface throws a 500 error: