The Free Software Media System - Server Backend & API
Handle forwarded requests not having port set in GetSmartApiUrl
Shadowghostdaf33143f6ad
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.csindex a0ad4a9ab5..56f997b3b5 100644--- a/Emby.Server.Implementations/ApplicationHost.cs+++ b/Emby.Server.Implementations/ApplicationHost.cs@@ -1080,7 +1080,8 @@ namespace Emby.Server.Implementationsif (ConfigurationManager.GetNetworkConfiguration().EnablePublishedServerUriByRequest){int? requestPort = request.Host.Port;- if ((requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase)) || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase)))+ if (((requestPort == 80 || requestPort == null) && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase))+ || ((requestPort == 443 || requestPort == null) && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase))){requestPort = -1;}