diff --git a/lib/cartodb/controllers/layergroup.js b/lib/cartodb/controllers/layergroup.js index a7628c21..2783552c 100644 --- a/lib/cartodb/controllers/layergroup.js +++ b/lib/cartodb/controllers/layergroup.js @@ -240,8 +240,6 @@ LayergroupController.prototype.register = function(app) { userMiddleware, this.prepareContext, this.analysisNodeStatus(this.analysisStatusBackend), - this.setCacheControlHeader(), - this.setLastModifiedHeader(), this.sendResponse() ); }; @@ -577,9 +575,7 @@ LayergroupController.prototype.setLastModifiedHeader = function () { LayergroupController.prototype.setCacheControlHeader = function () { return function setCacheControlHeaderMiddleware (req, res, next) { - if (!res.get('Cache-Control')) { - res.set('Cache-Control', 'public,max-age=31536000'); - } + res.set('Cache-Control', 'public,max-age=31536000'); next(); };