Browse Source

Remove CanConnectWithHttps Property

It is only used in one place and only adds confusion by existing
Mark Monteiro 5 years ago
parent
commit
fee76097f4

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

@@ -1413,7 +1413,7 @@ namespace Emby.Server.Implementations
                 InternalMetadataPath = ApplicationPaths.InternalMetadataPath,
                 InternalMetadataPath = ApplicationPaths.InternalMetadataPath,
                 CachePath = ApplicationPaths.CachePath,
                 CachePath = ApplicationPaths.CachePath,
                 HttpServerPortNumber = HttpPort,
                 HttpServerPortNumber = HttpPort,
-                SupportsHttps = CanConnectWithHttps,
+                SupportsHttps = ListenWithHttps || ServerConfigurationManager.Configuration.IsBehindProxy,
                 HttpsPortNumber = HttpsPort,
                 HttpsPortNumber = HttpsPort,
                 OperatingSystem = OperatingSystem.Id.ToString(),
                 OperatingSystem = OperatingSystem.Id.ToString(),
                 OperatingSystemDisplayName = OperatingSystem.Name,
                 OperatingSystemDisplayName = OperatingSystem.Name,
@@ -1455,8 +1455,6 @@ namespace Emby.Server.Implementations
         public bool ListenWithHttps => Certificate != null && ServerConfigurationManager.Configuration.EnableHttps;
         public bool ListenWithHttps => Certificate != null && ServerConfigurationManager.Configuration.EnableHttps;
 
 
         /// <inheritdoc/>
         /// <inheritdoc/>
-        public bool CanConnectWithHttps => ListenWithHttps || ServerConfigurationManager.Configuration.IsBehindProxy;
-
         public async Task<string> GetLocalApiUrl(CancellationToken cancellationToken)
         public async Task<string> GetLocalApiUrl(CancellationToken cancellationToken)
         {
         {
             try
             try

+ 0 - 6
MediaBrowser.Controller/IServerApplicationHost.cs

@@ -43,12 +43,6 @@ namespace MediaBrowser.Controller
         /// </summary>
         /// </summary>
         bool ListenWithHttps { get; }
         bool ListenWithHttps { get; }
 
 
-        /// <summary>
-        /// Gets a value indicating whether a client can connect to the server over HTTPS, either directly or via a
-        /// reverse proxy.
-        /// </summary>
-        bool CanConnectWithHttps { get; }
-
         /// <summary>
         /// <summary>
         /// Gets a value indicating whether this instance has update available.
         /// Gets a value indicating whether this instance has update available.
         /// </summary>
         /// </summary>