Commit c5f9a650 authored by Fangzhou Li's avatar Fangzhou Li Committed by Evan You

fix: `express.static()` accepts `maxAge` option in milliseconds rather than seconds (#191)

parent 81c62e51
...@@ -55,7 +55,7 @@ if (isProd) { ...@@ -55,7 +55,7 @@ if (isProd) {
} }
const serve = (path, cache) => express.static(resolve(path), { 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 })) app.use(compression({ threshold: 0 }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment