From 2300d56f688c2515def000fbd2330ad9e0116d33 Mon Sep 17 00:00:00 2001 From: Mike Date: Tue, 6 Jan 2015 22:36:42 -0500 Subject: Ssl in mediabrowser against new listener. --- .../ApplicationHost.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Startup.Common/ApplicationHost.cs') 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; } + } + /// /// Gets the mac address. /// -- cgit v1.2.3