Skip to content

Commit c5f9a65

Browse files
riophaeyyx990803
authored andcommitted
fix: express.static() accepts maxAge option in milliseconds rather than seconds (vuejs#191)
1 parent 81c62e5 commit c5f9a65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ if (isProd) {
5555
}
5656

5757
const serve = (path, cache) => express.static(resolve(path), {
58-
maxAge: cache && isProd ? 60 * 60 * 24 * 30 : 0
58+
maxAge: cache && isProd ? 1000 * 60 * 60 * 24 * 30 : 0
5959
})
6060

6161
app.use(compression({ threshold: 0 }))

0 commit comments

Comments
 (0)