aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/WebServer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/web/WebServer.java')
-rw-r--r--src/org/traccar/web/WebServer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/web/WebServer.java b/src/org/traccar/web/WebServer.java
index 83ead7ad8..2055d1161 100644
--- a/src/org/traccar/web/WebServer.java
+++ b/src/org/traccar/web/WebServer.java
@@ -105,7 +105,10 @@ public class WebServer {
resourceHandler.setWelcomeFiles(new String[] {"debug.html", "index.html"});
resourceHandler.setMinMemoryMappedContentLength(-1); // avoid locking files on Windows
} else {
- resourceHandler.setCacheControl("max-age=3600,public");
+ String cache = config.getString("web.cacheControl");
+ if (cache != null && !cache.isEmpty()) {
+ resourceHandler.setCacheControl(cache);
+ }
resourceHandler.setWelcomeFiles(new String[] {"release.html", "index.html"});
}
handlers.addHandler(resourceHandler);