Skip to content

Commit

Permalink
Update opensearch.go: updated http client for opensearch to skip tls …
Browse files Browse the repository at this point in the history
…check (#2)

external: updated opensearch http client to skip tls check
  • Loading branch information
Qsilver97 authored Jan 22, 2024
1 parent d823bad commit c2c859d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion external/opensearch/opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"io"
"net/http"
"strconv"
"crypto/tls"
)

var ErrNotFound = errors.New("Resource not found")
Expand All @@ -17,8 +18,12 @@ type Client struct {
}

func NewClient(host string) *Client {
tr := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: tr}
return &Client{
httpClient: http.DefaultClient,
httpClient: client,
Host: host,
}
}
Expand Down

0 comments on commit c2c859d

Please sign in to comment.