Merge pull request #15976 from hashicorp/jbardin/GH-15972

Fix crash in consul backend
This commit is contained in:
James Bardin 2017-09-01 17:19:49 -04:00 committed by GitHub
commit 6bd9e3f2ab
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ package consul
import ( import (
"context" "context"
"net/http"
"strings" "strings"
consulapi "github.com/hashicorp/consul/api" consulapi "github.com/hashicorp/consul/api"
@ -149,7 +148,7 @@ func (b *Backend) clientRaw() (*consulapi.Client, error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
config.HttpClient.Transport.(*http.Transport).TLSClientConfig = cc config.Transport.TLSClientConfig = cc
if v, ok := data.GetOk("http_auth"); ok && v.(string) != "" { if v, ok := data.GetOk("http_auth"); ok && v.(string) != "" {
auth := v.(string) auth := v.(string)