diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 11:07:11 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-02 11:07:11 +1300 |
commit | 831a7b81004c0456c317ef4c521cbebd4cbf5fc2 (patch) | |
tree | 28c4d7a4ccb95f7b5fb9d947505b6ed717505583 /src/org/traccar/api | |
parent | eadf492fe75fcfb0da617c9bc66bddd03139c96e (diff) | |
download | trackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.tar.gz trackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.tar.bz2 trackermap-server-831a7b81004c0456c317ef4c521cbebd4cbf5fc2.zip |
Start web app migration to REST API
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r-- | src/org/traccar/api/SecurityRequestFilter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/api/SecurityRequestFilter.java b/src/org/traccar/api/SecurityRequestFilter.java index 5f4d2332f..3563cbf77 100644 --- a/src/org/traccar/api/SecurityRequestFilter.java +++ b/src/org/traccar/api/SecurityRequestFilter.java @@ -16,6 +16,7 @@ package org.traccar.api; import org.traccar.Context; +import org.traccar.api.resource.ServerResource; import org.traccar.api.resource.SessionResource; import org.traccar.model.User; @@ -50,8 +51,10 @@ public class SecurityRequestFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) { + String path = requestContext.getUriInfo().getPath(); + String serverPath = ServerResource.class.getAnnotation(Path.class).value(); String sessionPath = SessionResource.class.getAnnotation(Path.class).value(); - if (sessionPath.equals(requestContext.getUriInfo().getPath())) { + if (serverPath.equals(path) || sessionPath.equals(path)) { return; } |