Hi, i'm trying to custom the cache control header for my media files. But as i see, kentico cms added the Cache-Control header in to the response header. I'm try to remove it by the following code snippet in Application_BeginRequest function in global.ascx.cs fileif (context.Request.Path.ToLower().Contains(@/getmedia/@))
{
context.Response.Headers.Remove(@Cache-Control@);
context.Response.Headers.Add(@Cache-Control@, @max-age=604800@);
}
But i cannot see my value in the Cache-Control header. The value alwaysset as the default value from the CMS.
↧