Open imbenham opened 2 years ago
Interesting. I wasn't aware of the change. Thanks for bringing this to our attention. For now, I recommend casting the strings to lowercase, like so: EventWebhookHeader.SIGNATURE().toLowerCase()
.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
Issue Summary
An apparent backend change to the sendgrid webhooks implementation has resulted in a change to the case of the signature and timestamp headers. For example, the signature header previously was "X-Twilio-Email-Event-Webhook-Signature" but now is "x-twilio-email-event-webhook-signature".
The helper functions to access the keys for these headers now return the incorrect values. Attempting to access the signature using the key form the helper nib now results in an undefined value: const sig = headers[EventWebhookHeader.SIGNATURE()] // sig === undefined
Steps to Reproduce
Code Snippet
Header examples
9/28/2021
9/9/2021
Technical details:
*@sendgrid/eventwebhook: 7.4.5,