Do not attach header middlewares to node status endpoint
This commit is contained in:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user