aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-07 18:04:24 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-07 18:04:24 -0700
commit104281f161f622df8fca0c65a5b9969ceb03c46f (patch)
treed9bc756c29a9088a762bb434c443fccbb1eb9e7e /src/main/java/org/traccar/web/WebServer.java
parentb745e3804950fefd24b38937c90c4d5c61219321 (diff)
downloadtrackermap-server-104281f161f622df8fca0c65a5b9969ceb03c46f.tar.gz
trackermap-server-104281f161f622df8fca0c65a5b9969ceb03c46f.tar.bz2
trackermap-server-104281f161f622df8fca0c65a5b9969ceb03c46f.zip
Extract user utils from reports
Diffstat (limited to 'src/main/java/org/traccar/web/WebServer.java')
-rw-r--r--src/main/java/org/traccar/web/WebServer.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java
index 06676fb41..f1ee8fcb2 100644
--- a/src/main/java/org/traccar/web/WebServer.java
+++ b/src/main/java/org/traccar/web/WebServer.java
@@ -15,6 +15,7 @@
*/
package org.traccar.web;
+import com.google.inject.servlet.GuiceFilter;
import org.eclipse.jetty.http.HttpCookie;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.http.HttpStatus;
@@ -164,6 +165,8 @@ public class WebServer implements LifecycleObject {
}
private void initApi(Config config, ServletContextHandler servletHandler) {
+ servletHandler.addFilter(GuiceFilter.class, "/api/*", EnumSet.allOf(DispatcherType.class));
+
servletHandler.addServlet(new ServletHolder(new AsyncSocketServlet()), "/api/socket");
JettyWebSocketServletContainerInitializer.configure(servletHandler, null);