Skip to content

Commit

Permalink
Allow configure health check path
Browse files Browse the repository at this point in the history
  • Loading branch information
SonicGD committed Jan 13, 2021
1 parent 3a34d23 commit c7d54ae
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Sitko.Core.Consul.Web/ConsulWebClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public ConsulWebClient(IServer server, IConsulClient consulClient, ConsulWebModu
_uri = address;
}

_healthUrl = $"{_uri.Scheme}://{_uri.Host}:{_uri.Port}/health";
_healthUrl = new Uri(_uri, _config.HealthCheckPath).ToString();
}

public async Task RegisterAsync()
Expand Down
1 change: 1 addition & 0 deletions src/Sitko.Core.Consul.Web/ConsulWebModuleConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ public class ConsulWebModuleConfig : ConsulModuleConfig
public TimeSpan DeregisterTimeout { get; set; } = TimeSpan.FromSeconds(60);

public bool AutoFixRegistration { get; set; } = false;
public string HealthCheckPath { get; set; } = "/health";
}
}

0 comments on commit c7d54ae

Please sign in to comment.