From fe728baee7781054cbe1998e79b9f147328d2511 Mon Sep 17 00:00:00 2001 From: t-tsutsumi Date: Tue, 9 May 2017 04:12:03 +0900 Subject: [PATCH] Disabling directory listing feature on Jetty --- src/main/java/JettyLauncher.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/JettyLauncher.java b/src/main/java/JettyLauncher.java index 01245c270..74d280d6e 100644 --- a/src/main/java/JettyLauncher.java +++ b/src/main/java/JettyLauncher.java @@ -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();