only validate UUID header when expecting one

This commit is contained in:
Dean Karn
2018-08-09 12:26:52 -07:00
parent 206a8b42fd
commit f583341fb8
+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") uuid := r.Header.Get("X-Hook-UUID")
if uuid == "" { if hook.uuid != "" && uuid == "" {
return nil, ErrMissingHookUUIDHeader return nil, ErrMissingHookUUIDHeader
} }