Skip to content

Commit a610eb2

Browse files
author
Dean Karn
authored
Merge pull request #43 from go-playground/bb-uuid-check-enhancement
only validate UUID header when expecting one
2 parents 206a8b4 + f583341 commit a610eb2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bitbucket/bitbucket.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func (hook Webhook) Parse(r *http.Request, events ...Event) (interface{}, error)
9393
}
9494

9595
uuid := r.Header.Get("X-Hook-UUID")
96-
if uuid == "" {
96+
if hook.uuid != "" && uuid == "" {
9797
return nil, ErrMissingHookUUIDHeader
9898
}
9999

0 commit comments

Comments
 (0)