Skip to content

Commit

Permalink
copy the scheme too
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-krystianc committed Nov 27, 2024
1 parent bef97f8 commit d3945d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Consul.Test/ClientTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class ClientTest : BaseFixture
[InlineData("http://my.consul.com:5678", "", "http://my.consul.com:5678/")]
[InlineData("my.consul.com", "", "http://my.consul.com:8500/")]

[InlineData("https://127.0.0.1:80", "", "https://127.0.0.1/")]
[InlineData("https://127.0.0.1:80", "", "https://127.0.0.1:80/")]
[InlineData("https://my.consul.com:5678", "", "https://my.consul.com:5678/")]

[InlineData("1.2.3.4:5678", "1", "https://1.2.3.4:5678/")]
Expand Down
1 change: 1 addition & 0 deletions Consul/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ private void ConfigureFromEnvironment(UriBuilder consulAddress)
consulAddress.Port = uri.Port;
}
consulAddress.Path = uri.AbsolutePath;
consulAddress.Scheme = uri.Scheme;
}

var useSsl = (Environment.GetEnvironmentVariable("CONSUL_HTTP_SSL") ?? string.Empty).Trim().ToLowerInvariant();
Expand Down

0 comments on commit d3945d1

Please sign in to comment.