diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-07 09:41:42 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-07 09:41:42 +1300 |
commit | a20e996c0929bcca43e5b5595f7ec320fad3c213 (patch) | |
tree | 4c8a6f962d8c3a33468d801f7d955e368ad00115 /src/org/traccar/web | |
parent | 1c534f33c3c0c4de018b1ae223d539ac9651180d (diff) | |
download | trackermap-server-a20e996c0929bcca43e5b5595f7ec320fad3c213.tar.gz trackermap-server-a20e996c0929bcca43e5b5595f7ec320fad3c213.tar.bz2 trackermap-server-a20e996c0929bcca43e5b5595f7ec320fad3c213.zip |
Restrict CORS origin header value
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r-- | src/org/traccar/web/BaseServlet.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/org/traccar/web/BaseServlet.java b/src/org/traccar/web/BaseServlet.java index 69a073d39..8b022d556 100644 --- a/src/org/traccar/web/BaseServlet.java +++ b/src/org/traccar/web/BaseServlet.java @@ -56,7 +56,7 @@ public abstract class BaseServlet extends HttpServlet { if (allowed == 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.displayName()); + String originSafe = URLEncoder.encode(origin, StandardCharsets.UTF_8.name()); resp.setHeader(HttpHeaders.Names.ACCESS_CONTROL_ALLOW_ORIGIN, originSafe); } |