in src/Microsoft.ServiceFabric.AspNetCore.Kestrel/KestrelCommunicationListener.cs [93:110]
protected override string GetListenerUrl()
{
// url with WebServer is always registered as http://+:port.
var listenUrl = "http://+:0";
// Get protocol and port from endpoint resource if specified.
if (this.endpointName != null)
{
var serviceEndpoint = this.GetEndpointResourceDescription(this.endpointName);
listenUrl = string.Format(
CultureInfo.InvariantCulture,
"{0}://+:{1}",
serviceEndpoint.Protocol.ToString().ToLowerInvariant(),
serviceEndpoint.Port);
}
return listenUrl;
}