Disabling directory listing feature on Jetty

This commit is contained in:
t-tsutsumi
2017-05-09 04:12:03 +09:00
parent d6f49eb442
commit fe728baee7

View File

@@ -96,6 +96,9 @@ public class JettyLauncher {
}
context.setTempDirectory(tmpDir);
// Disabling the directory listing feature.
context.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
ProtectionDomain domain = JettyLauncher.class.getProtectionDomain();
URL location = domain.getCodeSource().getLocation();