forked from I2P_Developers/i2p.i2p
Console: Add X-Content-Type-Options header everywhere (ticket #1763)
This commit is contained in:
@ -378,7 +378,7 @@ class BasicServlet extends HttpServlet
|
||||
{
|
||||
if (content.getContentType()!=null && response.getContentType()==null)
|
||||
response.setContentType(content.getContentType());
|
||||
|
||||
response.setHeader("X-Content-Type-Options", "nosniff");
|
||||
long lml = content.getLastModified();
|
||||
if (lml > 0)
|
||||
response.setDateHeader("Last-Modified",lml);
|
||||
@ -394,7 +394,6 @@ class BasicServlet extends HttpServlet
|
||||
long ct = content.getCacheTime();
|
||||
if (ct>=0)
|
||||
response.setHeader("Cache-Control", "public, max-age=" + ct);
|
||||
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
|
@ -379,6 +379,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
resp.setHeader("Pragma", "no-cache");
|
||||
resp.setHeader("X-Frame-Options", "SAMEORIGIN");
|
||||
resp.setHeader("X-XSS-Protection", "1; mode=block");
|
||||
resp.setHeader("X-Content-Type-Options", "nosniff");
|
||||
}
|
||||
|
||||
private void writeMessages(PrintWriter out, boolean isConfigure, String peerString) throws IOException {
|
||||
|
Reference in New Issue
Block a user