From 5d89531bbd3f5bf5e0b149a5374c352445f2a715 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Tue, 29 Sep 2015 12:12:27 +1300 Subject: Add HTTP CORS header (fix #1434) --- src/org/traccar/web/BaseServlet.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/org/traccar/web') 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); } -- cgit v1.2.3