Browse Source

Document HTTPS configuration options

Mark Monteiro 5 years ago
parent
commit
387fa474aa

+ 4 - 0
Emby.Server.Implementations/HttpServer/HttpListenerHost.cs

@@ -420,6 +420,10 @@ namespace Emby.Server.Implementations.HttpServer
             return true;
             return true;
         }
         }
 
 
+        /// <summary>
+        /// Validate a connection from a remote IP address to a URL to see if a redirection to HTTPS is required.
+        /// </summary>
+        /// <returns>True if the request is valid, or false if the request is not valid and an HTTPS redirect is required.</returns>
         private bool ValidateSsl(string remoteIp, string urlString)
         private bool ValidateSsl(string remoteIp, string urlString)
         {
         {
             if (_config.Configuration.RequireHttps && _appHost.ListenWithHttps)
             if (_config.Configuration.RequireHttps && _appHost.ListenWithHttps)

+ 31 - 4
MediaBrowser.Model/Configuration/ServerConfiguration.cs

@@ -45,17 +45,24 @@ namespace MediaBrowser.Model.Configuration
         public int HttpsPortNumber { get; set; }
         public int HttpsPortNumber { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets a value indicating whether [use HTTPS].
+        /// Gets or sets a value indicating whether to use HTTPS.
         /// </summary>
         /// </summary>
-        /// <value><c>true</c> if [use HTTPS]; otherwise, <c>false</c>.</value>
+        /// <remarks>
+        /// In order for HTTPS to be used, in addition to setting this to true, valid values must also be
+        /// provided for <see cref="CertificatePath"/> and <see cref="CertificatePassword"/>.
+        /// </remarks>
         public bool EnableHttps { get; set; }
         public bool EnableHttps { get; set; }
+
         public bool EnableNormalizedItemByNameIds { get; set; }
         public bool EnableNormalizedItemByNameIds { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the value pointing to the file system where the ssl certificate is located..
+        /// Gets or sets the filesystem path of an X.509 certificate to use for SSL.
         /// </summary>
         /// </summary>
-        /// <value>The value pointing to the file system where the ssl certificate is located..</value>
         public string CertificatePath { get; set; }
         public string CertificatePath { get; set; }
+
+        /// <summary>
+        /// Gets or sets the password required to access the X.509 certificate data in the file specified by <see cref="CertificatePath"/>.
+        /// </summary>
         public string CertificatePassword { get; set; }
         public string CertificatePassword { get; set; }
 
 
         /// <summary>
         /// <summary>
@@ -65,8 +72,11 @@ namespace MediaBrowser.Model.Configuration
         public bool IsPortAuthorized { get; set; }
         public bool IsPortAuthorized { get; set; }
 
 
         public bool AutoRunWebApp { get; set; }
         public bool AutoRunWebApp { get; set; }
+
         public bool EnableRemoteAccess { get; set; }
         public bool EnableRemoteAccess { get; set; }
+
         public bool CameraUploadUpgraded { get; set; }
         public bool CameraUploadUpgraded { get; set; }
+
         public bool CollectionsUpgraded { get; set; }
         public bool CollectionsUpgraded { get; set; }
 
 
         /// <summary>
         /// <summary>
@@ -82,6 +92,7 @@ namespace MediaBrowser.Model.Configuration
         /// </summary>
         /// </summary>
         /// <value>The metadata path.</value>
         /// <value>The metadata path.</value>
         public string MetadataPath { get; set; }
         public string MetadataPath { get; set; }
+
         public string MetadataNetworkPath { get; set; }
         public string MetadataNetworkPath { get; set; }
 
 
         /// <summary>
         /// <summary>
@@ -204,15 +215,31 @@ namespace MediaBrowser.Model.Configuration
         public int RemoteClientBitrateLimit { get; set; }
         public int RemoteClientBitrateLimit { get; set; }
 
 
         public bool EnableFolderView { get; set; }
         public bool EnableFolderView { get; set; }
+
         public bool EnableGroupingIntoCollections { get; set; }
         public bool EnableGroupingIntoCollections { get; set; }
+
         public bool DisplaySpecialsWithinSeasons { get; set; }
         public bool DisplaySpecialsWithinSeasons { get; set; }
+
         public string[] LocalNetworkSubnets { get; set; }
         public string[] LocalNetworkSubnets { get; set; }
+
         public string[] LocalNetworkAddresses { get; set; }
         public string[] LocalNetworkAddresses { get; set; }
+
         public string[] CodecsUsed { get; set; }
         public string[] CodecsUsed { get; set; }
+
         public bool IgnoreVirtualInterfaces { get; set; }
         public bool IgnoreVirtualInterfaces { get; set; }
+
         public bool EnableExternalContentInSuggestions { get; set; }
         public bool EnableExternalContentInSuggestions { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether the server should force connections over HTTPS.
+        /// </summary>
         public bool RequireHttps { get; set; }
         public bool RequireHttps { get; set; }
+
+        /// <summary>
+        /// Gets or sets a value indicating whether the server is behind a reverse proxy.
+        /// </summary>
         public bool IsBehindProxy { get; set; }
         public bool IsBehindProxy { get; set; }
+
         public bool EnableNewOmdbSupport { get; set; }
         public bool EnableNewOmdbSupport { get; set; }
 
 
         public string[] RemoteIPFilter { get; set; }
         public string[] RemoteIPFilter { get; set; }