Skip to content

Commit

Permalink
Fixed caching of theme in development mode. (#7812) (#7857)
Browse files Browse the repository at this point in the history
refs #7812

- replaced hard-coded maxAge value in static-theme middleware with dynamic value based on env
  • Loading branch information
vivekannan authored and kirrg001 committed Jan 25, 2017
1 parent 2d19ae2 commit ada528d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/server/middleware/static-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit ada528d

Please sign in to comment.