Ver Fonte

Fix GetLocalApiUrl for cases with https enabled

This should fix LiveTV and tuners
Vasily há 5 anos atrás
pai
commit
bece62fd5c
1 ficheiros alterados com 3 adições e 11 exclusões
  1. 3 11
      Emby.Server.Implementations/ApplicationHost.cs

+ 3 - 11
Emby.Server.Implementations/ApplicationHost.cs

@@ -1507,18 +1507,10 @@ namespace Emby.Server.Implementations
         public string GetLocalApiUrl(ReadOnlySpan<char> host)
         {
             var url = new StringBuilder(64);
-            if (EnableHttps)
-            {
-                url.Append("https://");
-            }
-            else
-            {
-                url.Append("http://");
-            }
-
-            url.Append(host)
+            url.Append(EnableHttps ? "https://" : "http://")
+                .Append(host)
                 .Append(':')
-                .Append(HttpPort);
+                .Append(EnableHttps ? HttpsPort : HttpPort);
 
             string baseUrl = ServerConfigurationManager.Configuration.BaseUrl;
             if (baseUrl.Length != 0)