fixes #1537 - [Feature Request] Provide option to select which interface(s) to bind to
This commit is contained in:
parent
49b96a3613
commit
18df678d3f
|
@ -831,9 +831,24 @@ namespace MediaBrowser.Server.Startup.Common
|
||||||
|
|
||||||
private string CertificatePath { get; set; }
|
private string CertificatePath { get; set; }
|
||||||
|
|
||||||
|
private string NormalizeConfiguredLocalAddress(string address)
|
||||||
|
{
|
||||||
|
var index = address.Trim('/').IndexOf('/');
|
||||||
|
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
address = address.Substring(index + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return address.Trim('/');
|
||||||
|
}
|
||||||
private IEnumerable<string> GetUrlPrefixes()
|
private IEnumerable<string> GetUrlPrefixes()
|
||||||
{
|
{
|
||||||
var hosts = ServerConfigurationManager.Configuration.LocalNetworkAddresses.ToList();
|
var hosts = ServerConfigurationManager
|
||||||
|
.Configuration
|
||||||
|
.LocalNetworkAddresses
|
||||||
|
.Select(NormalizeConfiguredLocalAddress)
|
||||||
|
.ToList();
|
||||||
|
|
||||||
if (hosts.Count == 0)
|
if (hosts.Count == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user