Use Header.Set() to override the existing header value (#1032)
Header.Add() appends string if there are same header key exists. Use Header.Set() to prevent this.
This commit is contained in:
@@ -84,7 +84,7 @@ func (p *WebhookPublisher) makeHttpRequest(r *publishRequest) {
|
||||
// Create request
|
||||
req, err := http.NewRequest("POST", url, &buf)
|
||||
for k, v := range r.headers {
|
||||
req.Header.Add(k, v)
|
||||
req.Header.Set(k, v)
|
||||
}
|
||||
|
||||
// Make the request
|
||||
|
||||
Reference in New Issue
Block a user