Fixed: No longer listening on the https port when ssl is disabled.

This commit is contained in:
Taloth Saldono 2014-03-20 22:30:23 +01:00
parent 37d2279011
commit 393727db8c
1 changed files with 7 additions and 2 deletions

View File

@ -43,6 +43,12 @@ namespace NzbDrone.Host.AccessControl
var localHttpsUrls = BuildUrls("https", "localhost", _configFileProvider.SslPort); var localHttpsUrls = BuildUrls("https", "localhost", _configFileProvider.SslPort);
var wildcardHttpsUrls = BuildUrls("https", "*", _configFileProvider.SslPort); var wildcardHttpsUrls = BuildUrls("https", "*", _configFileProvider.SslPort);
if (!_configFileProvider.EnableSsl)
{
localHttpsUrls.Clear();
wildcardHttpsUrls.Clear();
}
if (OsInfo.IsWindows && !_runtimeInfo.IsAdmin) if (OsInfo.IsWindows && !_runtimeInfo.IsAdmin)
{ {
var httpUrls = wildcardHttpUrls.All(IsRegistered) ? wildcardHttpUrls : localHttpUrls; var httpUrls = wildcardHttpUrls.All(IsRegistered) ? wildcardHttpUrls : localHttpUrls;
@ -51,7 +57,6 @@ namespace NzbDrone.Host.AccessControl
Urls.AddRange(httpUrls); Urls.AddRange(httpUrls);
Urls.AddRange(httpsUrls); Urls.AddRange(httpsUrls);
} }
else else
{ {
Urls.AddRange(wildcardHttpUrls); Urls.AddRange(wildcardHttpUrls);