fabio
fabio copied to clipboard
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
Related: #773
@pingiun I think this is a good change, sorry this has taken so long to get back to you. But if you can get this rebased against master, i'll try to sneak this in with the next release which will likely happy tomorrow.
@nathanejohnson good to hear! I switched from fabio to traefik myself but I'm happy to help out
So the config load tests are failing, I will have to postpone this for a bit when I have more time to dig in, but I believe it's in the parseScheme method for parsing the consul address.