Fix unintended redirection to welcome file

This commit is contained in:
Ry0taK 2020-02-06 05:47:03 +00:00
parent dfbe83f57c
commit c32713e967
2 changed files with 9 additions and 9 deletions

View File

@ -3,8 +3,8 @@ description = "DynmapCore"
dependencies {
compile project(path: ':DynmapCoreAPI', configuration: 'shadow')
compile 'javax.servlet:javax.servlet-api:3.1'
compile 'org.eclipse.jetty:jetty-server:9.4.24.v20191120'
compile 'org.eclipse.jetty:jetty-servlet:9.4.24.v20191120'
compile 'org.eclipse.jetty:jetty-server:9.4.26.v20200117'
compile 'org.eclipse.jetty:jetty-servlet:9.4.26.v20200117'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'org.yaml:snakeyaml:1.23'
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:20180219.1'

View File

@ -49,10 +49,7 @@ import org.dynmap.markers.MarkerAPI;
import org.dynmap.markers.impl.MarkerAPIImpl;
import org.dynmap.modsupport.ModSupportImpl;
import org.dynmap.renderer.DynmapBlockState;
import org.dynmap.servlet.FileResourceHandler;
import org.dynmap.servlet.JettyNullLogger;
import org.dynmap.servlet.LoginServlet;
import org.dynmap.servlet.MapStorageResourceHandler;
import org.dynmap.servlet.*;
import org.dynmap.storage.MapStorage;
import org.dynmap.storage.filetree.FileTreeMapStorage;
import org.dynmap.storage.mysql.MySQLMapStorage;
@ -843,12 +840,15 @@ public class DynmapCore implements DynmapCommonAPI {
filters.add(new CustomHeaderFilter(configuration.getNode("http-response-headers")));
FilterHandler fh = new FilterHandler(router, filters);
ContextHandler contextHandler = new ContextHandler();
contextHandler.setContextPath("/");
contextHandler.setHandler(fh);
HandlerList hlist = new HandlerList();
hlist.setHandlers(new org.eclipse.jetty.server.Handler[] { new SessionHandler(), fh });
hlist.setHandlers(new org.eclipse.jetty.server.Handler[] { new SessionHandler(), contextHandler });
webServer.setHandler(hlist);
addServlet("/up/configuration", new org.dynmap.servlet.ClientConfigurationServlet(this));
addServlet("/standalone/config.js", new org.dynmap.servlet.ConfigJSServlet(this));
addServlet("/up/configuration", new ClientConfigurationServlet(this));
addServlet("/standalone/config.js", new ConfigJSServlet(this));
if(authmgr != null) {
LoginServlet login = new LoginServlet(this);
addServlet("/up/login", login);