mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
normalize user specified external address
This commit is contained in:
parent
f15e534d41
commit
3ac2002759
@ -62,6 +62,17 @@ namespace MediaBrowser.Server.Implementations.Connect
|
|||||||
{
|
{
|
||||||
var address = _config.Configuration.WanDdns;
|
var address = _config.Configuration.WanDdns;
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(address))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
address = new Uri(address).Host;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null)
|
if (string.IsNullOrWhiteSpace(address) && DiscoveredWanIpAddress != null)
|
||||||
{
|
{
|
||||||
if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6)
|
if (DiscoveredWanIpAddress.AddressFamily == AddressFamily.InterNetworkV6)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user