From 03c05739d410b1a4a7aaf4e670318b9aec6f1043 Mon Sep 17 00:00:00 2001 From: Riophae Lee Date: Fri, 26 May 2017 20:32:36 +0800 Subject: [PATCH] fix: `express.static()` accepts `maxAge` option in milliseconds rather than seconds --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index d8a8d2535..40368dbcd 100644 --- a/server.js +++ b/server.js @@ -55,7 +55,7 @@ if (isProd) { } const serve = (path, cache) => express.static(resolve(path), { - maxAge: cache && isProd ? 60 * 60 * 24 * 30 : 0 + maxAge: cache && isProd ? 1000 * 60 * 60 * 24 * 30 : 0 }) app.use(compression({ threshold: 0 }))