diff options
| author | Luke <luke.pulverenti@gmail.com> | 2015-01-17 13:17:20 -0500 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2015-01-17 13:17:20 -0500 |
| commit | bb02d68cebb2379623dda5e7803135d80f15b27f (patch) | |
| tree | b0c370ce705ab77b476909a0c7515b6873ca131d /MediaBrowser.Server.Startup.Common/ApplicationHost.cs | |
| parent | 7a136349eea53097a4fb9e52de81a32bf2a4e086 (diff) | |
| parent | 2300d56f688c2515def000fbd2330ad9e0116d33 (diff) | |
Merge pull request #969 from jabbera/ssl2
Ssl in mediabrowser against new listener.
Diffstat (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs')
| -rw-r--r-- | MediaBrowser.Server.Startup.Common/ApplicationHost.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs index f7ff5eef1..29c530438 100644 --- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs +++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs @@ -133,6 +133,11 @@ namespace MediaBrowser.Server.Startup.Common "http://+:" + ServerConfigurationManager.Configuration.HttpServerPortNumber + "/" + WebApplicationName + "/" }; + if (ServerConfigurationManager.Configuration.UseHttps) + { + list.Add("https://+:" + ServerConfigurationManager.Configuration.HttpsPortNumber + "/" + WebApplicationName + "/"); + } + return list; } } @@ -805,7 +810,7 @@ namespace MediaBrowser.Server.Startup.Common { try { - ServerManager.Start(HttpServerUrlPrefixes); + ServerManager.Start(HttpServerUrlPrefixes, CertificatePath); } catch (Exception ex) { @@ -972,6 +977,8 @@ namespace MediaBrowser.Server.Startup.Common CachePath = ApplicationPaths.CachePath, MacAddress = GetMacAddress(), HttpServerPortNumber = HttpServerPort, + UseHttps = UseHttps, + CertificatePath = CertificatePath, OperatingSystem = OperatingSystemDisplayName, CanSelfRestart = CanSelfRestart, CanSelfUpdate = CanSelfUpdate, @@ -1046,6 +1053,21 @@ namespace MediaBrowser.Server.Startup.Common get { return ServerConfigurationManager.Configuration.HttpServerPortNumber; } } + public bool UseHttps + { + get { return this.ServerConfigurationManager.Configuration.UseHttps; } + } + + public string CertificatePath + { + get { return this.ServerConfigurationManager.Configuration.CertificatePath; } + } + + public int HttpsServerPort + { + get { return ServerConfigurationManager.Configuration.HttpsPortNumber; } + } + /// <summary> /// Gets the mac address. /// </summary> |
