Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit faadbce

Browse files
committed
feat(elasticsearch): set scheme option
1 parent b590384 commit faadbce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/elasticsearch/elasticsearch.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func (d recordDatabase) GetClient() *elastic.Client {
4040
}
4141
opts := []elastic.ClientOptionFunc{elastic.SetURL(d.config.Host), elastic.SetBasicAuth(d.config.User, d.config.Pwd)}
4242
if d.config.IgnoreCertificate {
43-
opts = append(opts, elastic.SetHttpClient(&http.Client{Transport: insecureTr}))
43+
opts = append(opts, elastic.SetScheme("https"), elastic.SetHttpClient(&http.Client{Transport: insecureTr}))
4444
}
4545
client, err := elastic.NewClient(opts...)
4646
if err != nil {

0 commit comments

Comments
 (0)