From f3798db47549eb66b66895135b425861032bbd64 Mon Sep 17 00:00:00 2001 From: morya Date: Fri, 8 Jun 2018 12:08:24 +0800 Subject: [PATCH] headers in http plugin config not working --- plugins/adp_http.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/adp_http.go b/plugins/adp_http.go index ae95aa5..87251de 100644 --- a/plugins/adp_http.go +++ b/plugins/adp_http.go @@ -48,6 +48,10 @@ func (c *Http) renderAndSend(message string, params map[string]interface{}) { return } + for k, v := range c.Headers { + req.Header.Set(k,v) + } + ctx, closer := context.WithTimeout(context.Background(), c.Timeout) defer closer()