diff options
author | Anton Tananaev <atananaev@lyft.com> | 2020-12-30 10:36:50 -0800 |
---|---|---|
committer | Anton Tananaev <atananaev@lyft.com> | 2020-12-30 10:36:50 -0800 |
commit | 6101300ab45882e02e4a0b90d30070cb904378eb (patch) | |
tree | 577cb6467644eb138b110f9cb3cb0656ab1936b1 /src/main/java/org/traccar/api | |
parent | 31c4daf083e9f4b799d73d4a1ccb9158505aea70 (diff) | |
download | trackermap-server-6101300ab45882e02e4a0b90d30070cb904378eb.tar.gz trackermap-server-6101300ab45882e02e4a0b90d30070cb904378eb.tar.bz2 trackermap-server-6101300ab45882e02e4a0b90d30070cb904378eb.zip |
Migrate more config keys
Diffstat (limited to 'src/main/java/org/traccar/api')
-rw-r--r-- | src/main/java/org/traccar/api/CorsResponseFilter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/api/CorsResponseFilter.java b/src/main/java/org/traccar/api/CorsResponseFilter.java index 227f80609..91aea5718 100644 --- a/src/main/java/org/traccar/api/CorsResponseFilter.java +++ b/src/main/java/org/traccar/api/CorsResponseFilter.java @@ -17,6 +17,7 @@ package org.traccar.api; import io.netty.handler.codec.http.HttpHeaderNames; import org.traccar.Context; +import org.traccar.config.Keys; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerResponseContext; @@ -45,7 +46,7 @@ public class CorsResponseFilter implements ContainerResponseFilter { if (!response.getHeaders().containsKey(HttpHeaderNames.ACCESS_CONTROL_ALLOW_ORIGIN.toString())) { String origin = request.getHeaderString(HttpHeaderNames.ORIGIN.toString()); - String allowed = Context.getConfig().getString("web.origin"); + String allowed = Context.getConfig().getString(Keys.WEB_ORIGIN); if (origin == null) { response.getHeaders().add(HttpHeaderNames.ACCESS_CONTROL_ALLOW_ORIGIN.toString(), ORIGIN_ALL); |