OWASP ZAP 2.7.0 - The cache-control and pragma HTTP header

0

Witam

Mam aplikacje ASP.NET MVC robię testy OWASP ZAP 2.7.0 w wyniku otrzymuje następujące zagrożenie

The cache-control and pragma HTTP header have not been set properly or are missing allowing the browser and proxies to cache content.

mimo ustawień meta

<meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />

co jeszcze mogę zrobić aby pozbyć się tego alertu?

Pozdrawiam
Andrzej

1

Ale to musisz wysłać odpowiedni nagłówek HTTP, ustawienia w HTML nic nie dadzą.

0
        void Application_PreSendRequestHeaders(Object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);  // HTTP 1.1.
            Response.Cache.AppendCacheExtension("no-store, must-revalidate");
            Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.0.
            Response.AppendHeader("Expires", "0"); // Proxies.
        }

1 użytkowników online, w tym zalogowanych: 0, gości: 1