diff options
Diffstat (limited to 'src/main/java/org/traccar/web/WebServer.java')
-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)); |