app.post('/webhooks/omdaa', express.raw({ type: '*/*' }), (req, res) => {
const sig = req.headers['x-omdaa-signature'];
if (!verify(sig, req.body, process.env.WEBHOOK_SECRET)) {
return res.status(401).send('invalid');
}
queue.push(parse(req.body));
res.status(200).send('ok');
});
قائمة
- رفض GET على نفس المسار
- حد أقصى لحجم body
- طابور async — لا عمل ثقيل داخل الطلب