aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api/BaseResource.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-03-30 20:26:14 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-03-30 20:27:00 +1300
commit82614e8ded7b854465cd842346e27ec2b82aacb3 (patch)
tree549281183cc844b06b426e13a4db26ad5c2dfb1c /src/org/traccar/api/BaseResource.java
parent3807bef307ecec16698162f7c11ec6c98a688e56 (diff)
downloadtrackermap-server-82614e8ded7b854465cd842346e27ec2b82aacb3.tar.gz
trackermap-server-82614e8ded7b854465cd842346e27ec2b82aacb3.tar.bz2
trackermap-server-82614e8ded7b854465cd842346e27ec2b82aacb3.zip
Implement OPTIONS verb API handler
Diffstat (limited to 'src/org/traccar/api/BaseResource.java')
-rw-r--r--src/org/traccar/api/BaseResource.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/org/traccar/api/BaseResource.java b/src/org/traccar/api/BaseResource.java
index aa1101f02..ab891b832 100644
--- a/src/org/traccar/api/BaseResource.java
+++ b/src/org/traccar/api/BaseResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,9 @@
*/
package org.traccar.api;
+import javax.annotation.security.PermitAll;
+import javax.ws.rs.OPTIONS;
+import javax.ws.rs.core.Response;
import javax.ws.rs.core.SecurityContext;
public class BaseResource {
@@ -30,4 +33,10 @@ public class BaseResource {
return 0;
}
+ @PermitAll
+ @OPTIONS
+ public Response options() {
+ return Response.noContent().build();
+ }
+
}