From d4364b7433880f3100aeaddad8806c329d1ec488 Mon Sep 17 00:00:00 2001 From: Yen-chi Chen Date: Sat, 9 Sep 2023 22:18:04 +0800 Subject: [PATCH] refactor: send maxAge > 0 (#1159) --- src/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.js b/src/server.js index 2a90c4a25..80967fdd2 100644 --- a/src/server.js +++ b/src/server.js @@ -29,7 +29,7 @@ const matchRoutes = (pathname, routes) => { const server = Express(); server .disable('x-powered-by') - .use(Express.static(process.env.RAZZLE_PUBLIC_DIR)); + .use(Express.static(process.env.RAZZLE_PUBLIC_DIR, { maxAge: '14d' })); const wrap = fn => (req, res, next) => fn(req, res).catch(err => next(err)); server.get(