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/web | |
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/web')
-rw-r--r-- | src/main/java/org/traccar/web/WebServer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java index ba4dbff3c..92e0ca958 100644 --- a/src/main/java/org/traccar/web/WebServer.java +++ b/src/main/java/org/traccar/web/WebServer.java @@ -138,7 +138,7 @@ public class WebServer { if (config.getBoolean(Keys.WEB_DEBUG)) { servletHandler.setWelcomeFiles(new String[] {"debug.html", "index.html"}); } else { - String cache = config.getString("web.cacheControl"); + String cache = config.getString(Keys.WEB_CACHE_CONTROL); if (cache != null && !cache.isEmpty()) { servletHolder.setInitParameter("cacheControl", cache); } @@ -153,7 +153,7 @@ public class WebServer { if (config.hasKey("media.path")) { ServletHolder servletHolder = new ServletHolder(DefaultServlet.class); servletHolder.setInitParameter("resourceBase", new File(config.getString("media.path")).getAbsolutePath()); - servletHolder.setInitParameter("dirAllowed", config.getString("media.dirAllowed", "false")); + servletHolder.setInitParameter("dirAllowed", "false"); servletHolder.setInitParameter("pathInfoOnly", "true"); servletHandler.addServlet(servletHolder, "/api/media/*"); servletHandler.addFilter(MediaFilter.class, "/api/media/*", EnumSet.allOf(DispatcherType.class)); |