diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-29 13:20:33 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-29 13:20:33 +1300 |
commit | 455dd5a6505c3d075c5f5ee950e8f48ec7458e8c (patch) | |
tree | 6cb3cca23cdd8b6dbc0333b9ce88ce2c4ba4631c /src/org | |
parent | 5d89531bbd3f5bf5e0b149a5374c352445f2a715 (diff) | |
download | trackermap-server-455dd5a6505c3d075c5f5ee950e8f48ec7458e8c.tar.gz trackermap-server-455dd5a6505c3d075c5f5ee950e8f48ec7458e8c.tar.bz2 trackermap-server-455dd5a6505c3d075c5f5ee950e8f48ec7458e8c.zip |
Add more CORS headers (fix #1434)
Diffstat (limited to 'src/org')
-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); } |