Closed goss2326 closed 6 years ago
Actually, upon reviewing the consul documentation (here: https://www.consul.io/docs/commands/index.html#consul_http_addr) it's recommended not to specify the URL scheme in the environment variable.
Will close this issue
This error occurs in this file: https://github.com/PlayFab/consuldotnet/blob/master/Consul/Client.cs
A
ConsulConfigurationException
is thrown when constructing an instance ofConsulClientConfiguration
if it finds a value in the environment variableCONSUL_HTTP_ADDR
that includes the URL scheme (http/https).For example, if the environment variable is set to
http://127.0.0.1:8500
it will fail because it is doing a string splint on:
and expected the second part to be the port number, but with this example it is the third part.It also seems strange that it is checking for this, when the address value just gets overwritten anyway by the default constructor.