-
Notifications
You must be signed in to change notification settings - Fork 509
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
Misleading / Incorrect documentation for webhook validation #1021
Comments
HI @maxiimillian! I am able to reproduce this. Will create a PR for this |
Thanks for having a look, just a heads up I believe this will set validate to true even when its been set in the options, since if validate is false, if (!options.validate) will be true. Maybe a !('validate' in options) or (options.validate === undefined) would work better. |
Yeah that makes sense, I'll make the change |
@maxiimillian please check the PR now |
Looks good |
Issue Summary
The comments above the webhook middleware function say that the optional validate property will default to true, however this is only the case when no options are passed in,
Steps to Reproduce
validate
property.Make sure that the options will make the request invalid.
Existing Code
if (!options) { options = { validate: true, }; }
I think the documentation should state this clearly or should actually set the validate to true if its not being set
The text was updated successfully, but these errors were encountered: