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 changed files with 1 additions and 1 deletions

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
}