Skip to content

Commit d1a8853

Browse files
authored
Allow Consul api to set default config for addr
As can be seen in https://github.com/hashicorp/consul/blob/91ee7990ccf27ab7fccff746f8df0df65c3c583d/api/api.go#L390 the API also defaults to localhost:8500, however it can also use the environment variable CONSUL_HTTP_ADDR which is useful when fabio is run with nomad. This change makes sure that the existing default stays working, but it now works better by default in more situations
1 parent bf654ba commit d1a8853

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/default.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ var defaultConfig = &Config{
5151
Registry: Registry{
5252
Backend: "consul",
5353
Consul: Consul{
54-
Addr: "localhost:8500",
55-
Scheme: "http",
54+
Addr: "",
55+
Scheme: "",
5656
KVPath: "/fabio/config",
5757
NoRouteHTMLPath: "/fabio/noroute.html",
5858
TagPrefix: "urlprefix-",

0 commit comments

Comments
 (0)