diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/web/BaseServlet.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/web/BaseServlet.java b/src/org/traccar/web/BaseServlet.java index 9b6964623..97432e9fd 100644 --- a/src/org/traccar/web/BaseServlet.java +++ b/src/org/traccar/web/BaseServlet.java @@ -42,6 +42,8 @@ public abstract class BaseServlet extends HttpServlet { resp.setContentType("application/json"); resp.setCharacterEncoding("UTF-8"); resp.setHeader("Access-Control-Allow-Origin", "*"); + resp.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); + resp.setHeader("Access-Control-Allow-Methods", "GET, POST"); if (!handle(command, req, resp)) { resp.sendError(HttpServletResponse.SC_BAD_REQUEST); } |