fix(webhooks): correct Ombi isReplay() call after signature change (closes #70)

This commit is contained in:
2026-05-28 17:40:33 +01:00
parent 70710061b8
commit a4d398ef1b
+2 -2
View File
@@ -813,10 +813,10 @@ router.post('/ombi', webhookLimiter, (req, res) => {
// Use applicationUrl as instance identifier for replay protection
const instanceName = applicationUrl || 'ombi';
// Use requestId + eventType + current time as replay key
const eventDate = req.body.requestedDate || req.body.RequestedDate || new Date().toISOString();
const contentId = requestId || null;
if (isReplay(eventType, instanceName, `${requestId}-${eventDate}`)) {
if (isReplay(eventType, instanceName, eventDate, contentId)) {
logToFile(`[Webhook] Ombi duplicate event ignored: ${eventType} requestId=${requestId}`);
return res.status(200).json({ received: true, duplicate: true });
}