aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/BaseServlet.java
diff options
context:
space:
mode:
authorAlexander <4nonym0us@xakep.ru>2016-02-25 13:16:43 +0200
committerAlexander <4nonym0us@xakep.ru>2016-02-25 13:16:43 +0200
commitde5c65eb3854776840690a80cf8b3cf8aaf2c7b9 (patch)
tree22a7de885f6c859d3f3a2784026131a53122e8d3 /src/org/traccar/web/BaseServlet.java
parent967b513318d4778b7ae5023e48cb544e2e9579a3 (diff)
downloadtrackermap-server-de5c65eb3854776840690a80cf8b3cf8aaf2c7b9.tar.gz
trackermap-server-de5c65eb3854776840690a80cf8b3cf8aaf2c7b9.tar.bz2
trackermap-server-de5c65eb3854776840690a80cf8b3cf8aaf2c7b9.zip
#1751 Bugfix in old API
Diffstat (limited to 'src/org/traccar/web/BaseServlet.java')
-rw-r--r--src/org/traccar/web/BaseServlet.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/web/BaseServlet.java b/src/org/traccar/web/BaseServlet.java
index 8b022d556..17f4f19cd 100644
--- a/src/org/traccar/web/BaseServlet.java
+++ b/src/org/traccar/web/BaseServlet.java
@@ -53,7 +53,7 @@ public abstract class BaseServlet extends HttpServlet {
String origin = req.getHeader(HttpHeaders.Names.ORIGIN);
String allowed = Context.getConfig().getString("web.origin");
- if (allowed == null) {
+ if (allowed == null || origin == null) {
resp.setHeader(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN, ALLOW_ORIGIN_VALUE);
} else if (allowed.contains(origin)) {
String originSafe = URLEncoder.encode(origin, StandardCharsets.UTF_8.name());