feat(webhooks): display webhook statistics (events received, polls skipped, last event) in status panel
All checks were successful
All checks were successful
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user