How do I remove the Vary:* from the response header for all my requests in the WEB APP (ASP.NET MVC)
Thanks
How do I remove the Vary:* from the response header for all my requests in the WEB APP (ASP.NET MVC)
Thanks
The below code might help you.
protected void Application_PreSendRequestHeaders(object sender, EventArgs e)
{
HttpContext.Current.Response.Headers.Remove("Vary");
}
or in your web.config like:
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="Vary" />
</customHeaders>
</httpProtocol>
</system.webServer>
© 2022 - 2024 — McMap. All rights reserved.
Vary:*
soVary:Accept-Encoding
would be okay? – Kalif