0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

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
This commit is contained in:
Vivek Kannan 2017-01-25 19:40:46 +05:30 committed by Katharina Irrgang
parent 2d19ae2c6c
commit ada528d386

View file

@ -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);
}
}