aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/WebServer.java')
-rw-r--r--src/org/traccar/web/WebServer.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index 317e4db46..f139b1c7a 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -30,6 +30,7 @@ import org.traccar.Config;
import org.traccar.api.CorsResponseFilter;
import org.traccar.api.SecurityRequestFilter;
import org.traccar.api.resource.DeviceResource;
+import org.traccar.api.resource.SessionResource;
import org.traccar.api.resource.UserResource;
import org.traccar.helper.Log;
@@ -136,8 +137,8 @@ public class WebServer {
ResourceConfig resourceConfig = new ResourceConfig();
resourceConfig.register(SecurityRequestFilter.class);
resourceConfig.register(CorsResponseFilter.class);
- resourceConfig.registerClasses(DeviceResource.class, UserResource.class);
- ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS);
+ resourceConfig.registerClasses(SessionResource.class, DeviceResource.class, UserResource.class);
+ ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
ServletHolder servletHolder = new ServletHolder(new ServletContainer(resourceConfig));
servletHandler.addServlet(servletHolder, "/rest/*");
handlers.addHandler(servletHandler);