redirect to overlord console by default

This commit is contained in:
Xavier Léauté 2015-11-11 09:54:22 -08:00
parent 07157f9e9d
commit b519fcf99b
2 changed files with 4 additions and 0 deletions

View File

@ -229,6 +229,9 @@ public class CliOverlord extends ServerRunnable
public void initialize(Server server, Injector injector)
{
final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
root.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
root.setInitParameter("org.eclipse.jetty.servlet.Default.redirectWelcome", "true");
root.setWelcomeFiles(new String[]{"index.html", "console.html"});
ServletHolder holderPwd = new ServletHolder("default", DefaultServlet.class);

View File

@ -51,6 +51,7 @@ class CoordinatorJettyServerInitializer implements JettyServerInitializer
public void initialize(Server server, Injector injector)
{
final ServletContextHandler root = new ServletContextHandler(ServletContextHandler.SESSIONS);
root.setInitParameter("org.eclipse.jetty.servlet.Default.dirAllowed", "false");
ServletHolder holderPwd = new ServletHolder("default", DefaultServlet.class);