ARTREMIS-1703 disable listing in web console
This commit is contained in:
parent
7596f0c192
commit
5144fbb24c
|
@ -48,6 +48,12 @@
|
|||
<param-value>${plugin-scripts}</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>Disable listing of directories and files</description>
|
||||
<param-name>org.eclipse.jetty.servlet.Default.dirAllowed</param-name>
|
||||
<param-value>false</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.apache.activemq.hawtio.branding.PluginContextListener</listener-class>
|
||||
</listener>
|
||||
|
|
|
@ -48,6 +48,12 @@
|
|||
<param-value>${plugin-scripts}</param-value>
|
||||
</context-param>
|
||||
|
||||
<context-param>
|
||||
<description>Disable listing of directories and files</description>
|
||||
<param-name>org.eclipse.jetty.servlet.Default.dirAllowed</param-name>
|
||||
<param-value>false</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
<listener-class>org.apache.activemq.hawtio.plugin.PluginContextListener</listener-class>
|
||||
</listener>
|
||||
|
|
|
@ -110,7 +110,7 @@ public class WebServerComponent implements ExternalComponent {
|
|||
|
||||
ResourceHandler resourceHandler = new ResourceHandler();
|
||||
resourceHandler.setResourceBase(warDir.toString());
|
||||
resourceHandler.setDirectoriesListed(true);
|
||||
resourceHandler.setDirectoriesListed(false);
|
||||
resourceHandler.setWelcomeFiles(new String[]{"index.html"});
|
||||
|
||||
DefaultHandler defaultHandler = new DefaultHandler();
|
||||
|
@ -120,6 +120,7 @@ public class WebServerComponent implements ExternalComponent {
|
|||
context.setContextPath("/");
|
||||
context.setResourceBase(warDir.toString());
|
||||
context.setHandler(resourceHandler);
|
||||
context.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
|
||||
|
||||
handlers.addHandler(context);
|
||||
handlers.addHandler(defaultHandler);
|
||||
|
|
Loading…
Reference in New Issue