disabled cache by http header Pragma and Cache-control

This commit is contained in:
jomu
2013-02-07 01:02:26 +00:00
parent f8885f6077
commit e4fa12bd8c

View File

@ -51,6 +51,13 @@ public class OwaspStandardFilter implements Filter {
// The only defined value, "nosniff", prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
// This also applies to Google Chrome, when downloading extensions.
res.addHeader("X-Content-Type-Options", "nosniff");
// disableing caching by Pragma setting
res.addHeader("Pragma", "no-cache");
// disabling caching by Cache-control settings
res.addHeader("Cache-control", "no-cache, no-store, must-revalidate, private");
chain.doFilter(request, response);
}