ARTEMIS-3454 prevent directory listing for deployed web apps

This commit is contained in:
Justin Bertram 2021-09-01 12:45:56 -05:00 committed by Gary Tully
parent b777f1f1cc
commit 4569263c04
1 changed files with 1 additions and 0 deletions

View File

@ -147,6 +147,7 @@ public class WebServerComponent implements ExternalComponent {
dirToUse = instanceWarDir; dirToUse = instanceWarDir;
} }
WebAppContext webContext = deployWar(app.url, app.war, dirToUse); WebAppContext webContext = deployWar(app.url, app.war, dirToUse);
webContext.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
webContexts.add(webContext); webContexts.add(webContext);
if (app.war.startsWith("console")) { if (app.war.startsWith("console")) {
consoleUrl = webServerConfig.bind + "/" + app.url; consoleUrl = webServerConfig.bind + "/" + app.url;