enhancement(metrics): allow disabling via config option
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
committed by
Tilman Vatteroth
parent
a349ddde56
commit
143864b8d9
@@ -24,6 +24,9 @@ statusRouter.get('/_health', function (req, res) {
|
||||
|
||||
// get status
|
||||
statusRouter.get('/status', function (req, res, next) {
|
||||
if (!config.enableStatsApi) {
|
||||
return errors.errorForbidden(res)
|
||||
}
|
||||
realtime.getStatus(function (data) {
|
||||
res.set({
|
||||
'Cache-Control': 'private', // only cache by client
|
||||
|
||||
Reference in New Issue
Block a user