I have the following code:
public class CacheHeader : OwinMiddleware
{
public CacheHeader(OwinMiddleware next)
: base(next)
{
}
public override async Task Invoke(IOwinContext context)
{
context.Response.Headers["Cache-Control"] = "no-cache, no-store, must-revalidate";
context.Response.Headers["Pragma"] = "no-cache";
context.Response.Headers["Expires"] = "0";
await Next.Invoke(context);
}
}
Which is supposed to have changed the Http cache control headers to have "no store, no-cache", but when I check it in Chrome Dev tools, I get the following:
Cache-Control:no-cache
Connection:keep-alive
Host:10.0.211.202
Pragma:no-cache
Is there a reason I'm not able to change what's in cache-control from no-cache to no-cache,no-store?