From d4395027a7f0f60619ce8cb084096a71cb5d29d2 Mon Sep 17 00:00:00 2001 From: Menci Date: Wed, 7 Nov 2018 22:57:54 +0800 Subject: [PATCH] Fix wrong maxAge of static resources --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index 8def56e..4b9eb6e 100644 --- a/app.js +++ b/app.js @@ -32,7 +32,7 @@ global.syzoj = { }); // Set assets dir - app.use(Express.static(__dirname + '/static', { maxage: '1y' })); + app.use(Express.static(__dirname + '/static', { maxAge: syzoj.production ? '1y' : 0 })); // Set template engine ejs app.set('view engine', 'ejs');