From ada528d386aee3054601edf87393781903f19322 Mon Sep 17 00:00:00 2001 From: Vivek Kannan Date: Wed, 25 Jan 2017 19:40:46 +0530 Subject: [PATCH] Fixed caching of theme in development mode. (#7812) (#7857) refs #7812 - replaced hard-coded maxAge value in static-theme middleware with dynamic value based on env --- core/server/middleware/static-theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/server/middleware/static-theme.js b/core/server/middleware/static-theme.js index e79d33d381..5fb5256628 100644 --- a/core/server/middleware/static-theme.js +++ b/core/server/middleware/static-theme.js @@ -22,7 +22,7 @@ function forwardToExpressStatic(req, res, next) { } else { express.static( path.join(config.getContentPath('themes'), req.app.get('activeTheme')), - {maxAge: utils.ONE_YEAR_MS} + {maxAge: config.get('env') === 'development' ? 0 : utils.ONE_YEAR_MS} )(req, res, next); } }