Merge pull request #43 from go-playground/bb-uuid-check-enhancement

only validate UUID header when expecting one
This commit is contained in:
Dean Karn
2018-08-09 12:28:51 -07:00
committed by GitHub
+1 -1
View File
@@ -93,7 +93,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
}
uuid := r.Header.Get("X-Hook-UUID")
if uuid == "" {
if hook.uuid != "" && uuid == "" {
return nil, ErrMissingHookUUIDHeader
}