-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Content Type case sensitivity #134
Conversation
...baseEvent, | ||
headers: { | ||
...baseEvent.headers, | ||
'content-type': undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably remove the content-type
key/value from the test since it wouldn't appear in a real headers object
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally was explicitly calling delete headers['content-type'];
to remove this key/value but some investigation suggested this as a way of doing the same thing.
in TypeScript, setting a key to undefined using object spread syntax does effectively remove the key from the resulting object.
Accurate?
🎉 This PR is included in version 2.0.6 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
📝 Description
content-type
orContent-Type
in the headerscontent-type
orContent-Type
header keysThis change is necessary because GitHub very recently updated their webhook payloads and they've switched from 'content-type' to 'Content-Type'.