Skip to content
This repository has been archived by the owner on Oct 6, 2019. It is now read-only.

Commit

Permalink
Fixed vault health display for self-signed vault instances
Browse files Browse the repository at this point in the history
  • Loading branch information
Caiyeon committed Aug 19, 2017
1 parent f423bd7 commit 5eea268
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion vault/helper.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package vault

import (
"crypto/tls"
"errors"
"io/ioutil"
"log"
Expand All @@ -10,7 +11,15 @@ import (
)

func VaultHealth() (string, error) {
resp, err := http.Get(vaultConfig.Address + "/v1/sys/health")
client := &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: vaultConfig.Tls_skip_verify,
},
},
}

resp, err := client.Get(vaultConfig.Address + "/v1/sys/health")
if err != nil {
return "", err
}
Expand Down

0 comments on commit 5eea268

Please sign in to comment.