state/remote: allow https consul addresses
Sending state over a cleartext protocol is bad in untrusted networks. Expose `-backend-config="scheme=https"` and wire it through to the Consul client.
This commit is contained in:
parent
dc4abb48fa
commit
0a24e72c3b
|
@ -20,6 +20,9 @@ func consulFactory(conf map[string]string) (Client, error) {
|
||||||
if addr, ok := conf["address"]; ok && addr != "" {
|
if addr, ok := conf["address"]; ok && addr != "" {
|
||||||
config.Address = addr
|
config.Address = addr
|
||||||
}
|
}
|
||||||
|
if scheme, ok := conf["scheme"]; ok && scheme != "" {
|
||||||
|
config.Scheme = scheme
|
||||||
|
}
|
||||||
|
|
||||||
client, err := consulapi.NewClient(config)
|
client, err := consulapi.NewClient(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue