Do not attach header middlewares to node status endpoint

This commit is contained in:
Daniel García Aubert
2018-03-07 12:30:59 +01:00
parent d351c8d14c
commit 33089be2cd
+1 -5
View File
@@ -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();
};