mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 14:44:43 -04:00
enhancement(metrics): allow disabling via config option
Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
parent
a349ddde56
commit
143864b8d9
6 changed files with 20 additions and 11 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue