Merge pull request #1949 from metamx/overlord-console-redirect

redirect to overlord console by default
This commit is contained in:
Fangjin Yang 2015-12-10 15:11:00 -08:00
commit d95adb5749
2 changed files with 4 additions and 0 deletions

View File

@ -231,6 +231,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

@ -53,6 +53,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);