@@ -41,21 +41,23 @@ const (
41
41
)
42
42
43
43
type WebhookOutput struct {
44
- errorChan chan error
45
- eventChan chan event.Event
46
- logger plugin.Logger
47
- format string
48
- url string
49
- username string
50
- password string
44
+ errorChan chan error
45
+ eventChan chan event.Event
46
+ logger plugin.Logger
47
+ format string
48
+ url string
49
+ username string
50
+ password string
51
+ skipVerify bool
51
52
}
52
53
53
54
func New (options ... WebhookOptionFunc ) * WebhookOutput {
54
55
w := & WebhookOutput {
55
- errorChan : make (chan error ),
56
- eventChan : make (chan event.Event , 10 ),
57
- format : "adder" ,
58
- url : "http://localhost:3000" ,
56
+ errorChan : make (chan error ),
57
+ eventChan : make (chan event.Event , 10 ),
58
+ format : "adder" ,
59
+ url : "http://localhost:3000" ,
60
+ skipVerify : false ,
59
61
}
60
62
for _ , option := range options {
61
63
option (w )
@@ -270,7 +272,7 @@ func (w *WebhookOutput) SendWebhook(e *event.Event) error {
270
272
IdleConnTimeout : defaultTransport .IdleConnTimeout ,
271
273
ExpectContinueTimeout : defaultTransport .ExpectContinueTimeout ,
272
274
TLSHandshakeTimeout : defaultTransport .TLSHandshakeTimeout ,
273
- TLSClientConfig : & tls.Config {InsecureSkipVerify : true },
275
+ TLSClientConfig : & tls.Config {InsecureSkipVerify : w . skipVerify },
274
276
}
275
277
client := & http.Client {Transport : customTransport }
276
278
// Send payload
0 commit comments