mirror of
https://github.com/hashicorp/vault.git
synced 2026-06-04 14:25:35 -04:00
Use strconv.ParseBool
This commit is contained in:
parent
5c93047642
commit
c47ecbc9d3
1 changed files with 9 additions and 2 deletions
|
|
@ -293,8 +293,15 @@ func (c *ServerCommand) detectAdvertise(detect physical.AdvertiseDetect,
|
|||
}
|
||||
|
||||
// Check if TLS is disabled
|
||||
if val, ok := list.Config["tls_disable"]; ok && val == "1" {
|
||||
scheme = "http"
|
||||
if val, ok := list.Config["tls_disable"]; ok {
|
||||
disable, err := strconv.ParseBool(val)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("tls_disable: %s", err)
|
||||
}
|
||||
|
||||
if disable {
|
||||
scheme = "http"
|
||||
}
|
||||
}
|
||||
|
||||
// Check for address override
|
||||
|
|
|
|||
Loading…
Reference in a new issue