Skip to content

Commit

Permalink
Allow Consul api to set default config for addr
Browse files Browse the repository at this point in the history
As can be seen in https:/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
  • Loading branch information
pingiun authored May 15, 2021
1 parent bf654ba commit d1a8853
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ var defaultConfig = &Config{
Registry: Registry{
Backend: "consul",
Consul: Consul{
Addr: "localhost:8500",
Scheme: "http",
Addr: "",
Scheme: "",
KVPath: "/fabio/config",
NoRouteHTMLPath: "/fabio/noroute.html",
TagPrefix: "urlprefix-",
Expand Down

0 comments on commit d1a8853

Please sign in to comment.