Implemented the ProxyHandler into the MCDashWrapper.java

This commit is contained in:
Mathias Wagner 2024-02-15 00:46:53 +01:00
parent cf0a3cdb67
commit b3a60acee2
Signed by: Mathias
GPG Key ID: B8DC354B0A1F5B44

View File

@ -6,6 +6,7 @@ import de.gnmyt.mcdash.api.DashShutdownHook;
import de.gnmyt.mcdash.api.Logger;
import de.gnmyt.mcdash.api.ServerManager;
import de.gnmyt.mcdash.handler.DefaultHandler;
import de.gnmyt.mcdash.handler.ProxyHandler;
import de.gnmyt.mcdash.handler.StaticHandler;
import org.reflections.Reflections;
@ -44,6 +45,7 @@ public class MCDashWrapper {
try {
server = HttpServer.create(new InetSocketAddress(SERVER_PORT), 0);
server.setExecutor(Executors.newCachedThreadPool());
server.createContext("/proxy/", new ProxyHandler());
server.createContext("/", new StaticHandler());
registerRoutes();
server.start();