diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-29 12:12:27 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-09-29 12:12:27 +1300 |
commit | 5d89531bbd3f5bf5e0b149a5374c352445f2a715 (patch) | |
tree | 376fe5c0990f54b010c29b6fb7f0f93cc9ff56c1 /src/org | |
parent | d6f63ef1ac9e1b66205d3671d63058b2684b34ab (diff) | |
download | traccar-server-5d89531bbd3f5bf5e0b149a5374c352445f2a715.tar.gz traccar-server-5d89531bbd3f5bf5e0b149a5374c352445f2a715.tar.bz2 traccar-server-5d89531bbd3f5bf5e0b149a5374c352445f2a715.zip |
Add HTTP CORS header (fix #1434)
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/traccar/web/BaseServlet.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/org/traccar/web/BaseServlet.java b/src/org/traccar/web/BaseServlet.java index 972a1b8e7..9b6964623 100644 --- a/src/org/traccar/web/BaseServlet.java +++ b/src/org/traccar/web/BaseServlet.java @@ -41,6 +41,7 @@ public abstract class BaseServlet extends HttpServlet { try { resp.setContentType("application/json"); resp.setCharacterEncoding("UTF-8"); + resp.setHeader("Access-Control-Allow-Origin", "*"); if (!handle(command, req, resp)) { resp.sendError(HttpServletResponse.SC_BAD_REQUEST); } |