aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-04-04 15:38:42 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-04-04 15:38:42 -0700
commit7bea8d52acd3d9cd1fa9502229cc38faac6cf7bc (patch)
tree1f64a6ddf0d187a1f932aff93cd8ed8ea9582cef /src/main/java/org/traccar/web/WebServer.java
parent92dc10c476141c4c524c07d6625009a8c6071c87 (diff)
downloadtrackermap-server-7bea8d52acd3d9cd1fa9502229cc38faac6cf7bc.tar.gz
trackermap-server-7bea8d52acd3d9cd1fa9502229cc38faac6cf7bc.tar.bz2
trackermap-server-7bea8d52acd3d9cd1fa9502229cc38faac6cf7bc.zip
Upgrade Jetty web server
Diffstat (limited to 'src/main/java/org/traccar/web/WebServer.java')
-rw-r--r--src/main/java/org/traccar/web/WebServer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 82e9397e4..ffa06adfd 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -29,6 +29,7 @@ import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.websocket.server.config.JettyWebSocketServletContainerInitializer;
import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;
import org.glassfish.jersey.servlet.ServletContainer;
@@ -149,6 +150,7 @@ public class WebServer {
private void initApi(Config config, ServletContextHandler servletHandler) {
servletHandler.addServlet(new ServletHolder(new AsyncSocketServlet()), "/api/socket");
+ JettyWebSocketServletContainerInitializer.configure(servletHandler, null);
String mediaPath = config.getString(Keys.MEDIA_PATH);
if (mediaPath != null) {