- Set default cache-control for webapps and eepsite
    - Disable dir listing for console webapps
  * WebAppStarter: Remove static log
This commit is contained in:
zzz
2012-03-14 12:04:20 +00:00
parent 326b9998fd
commit 17f9280b3f
5 changed files with 23 additions and 17 deletions

View File

@ -101,8 +101,7 @@ public class I2PSnarkServlet extends DefaultServlet {
public Resource getResource(String pathInContext)
{
if (pathInContext == null || pathInContext.equals("/") || pathInContext.equals("/index.jsp") ||
pathInContext.equals("/index.html") || pathInContext.startsWith("/.icons/") ||
pathInContext.startsWith("/.js/") || pathInContext.startsWith("/.ajax/"))
pathInContext.equals("/index.html") || pathInContext.startsWith("/.icons/"))
return super.getResource(pathInContext);
// files in the i2psnark/ directory
try {
@ -118,9 +117,6 @@ public class I2PSnarkServlet extends DefaultServlet {
*/
@Override
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
////////////////////////////////////
//if (resource.getName().startsWith("jar:file:"))
// response.setHeader("Cache-Control", "max-age=86400"); // cache for a day
super.doGet(request, response);
}