feat(webhooks): display webhook statistics (events received, polls skipped, last event) in status panel
All checks were successful
Build and Push Docker Image / build (push) Successful in 50s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 58s
CI / Security audit (push) Successful in 1m11s
CI / Tests & coverage (push) Successful in 1m24s

This commit is contained in:
2026-05-19 19:18:29 +01:00
parent 015e07ae7a
commit d06e24dbb6
3 changed files with 143 additions and 14 deletions

View File

@@ -803,6 +803,17 @@ router.get('/status', requireAuth, (req, res) => {
}
});
// Webhook metrics — exposes global and per-instance webhook metrics for the
// Webhooks Configuration panel. Available to all authenticated users.
router.get('/webhook-metrics', requireAuth, (req, res) => {
try {
const { getGlobalWebhookMetrics } = require('../utils/cache');
res.json(getGlobalWebhookMetrics());
} catch (err) {
res.status(500).json({ error: 'Failed to get webhook metrics', details: err.message });
}
});
// Cover art proxy — fetches external poster images server-side so the
// browser loads them from 'self' and the CSP img-src stays tight.
// Requires authentication. Only proxies http/https URLs.