Skip to content

Commit

Permalink
Respect caching flag
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmerfield committed Mar 29, 2018
1 parent 1f4c5b4 commit dd7acff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/site/routes/css.js
Expand Up @@ -6,7 +6,7 @@ var static_dir = __dirname + '/../static';
var css_dir = static_dir + '/css';
var images_dir = static_dir + '/images';
var finder = require('finder');

var config = require('config');
module.exports = function (req, res, next) {

var styles = fs.readdirSync(css_dir);
Expand Down Expand Up @@ -35,6 +35,6 @@ module.exports = function (req, res, next) {
css = minimize.minify(css || '');

res.set('Content-Type', 'text/css');
res.set('Cache-Control', 'max-age=31536000');
if (config.cache) res.set('Cache-Control', 'max-age=31536000');
res.send(css);
};

0 comments on commit dd7acff

Please sign in to comment.