diff options
| author | Vasily <JustAMan@users.noreply.github.com> | 2020-05-13 20:36:54 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-13 20:36:54 +0300 |
| commit | f08830ea00e7111d68f12b001995edc56177f6e4 (patch) | |
| tree | 129e4760dac57a5cb69977c991d57eb9e9a63614 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 69676373ca01411dc1053677974a9b519b5a253e (diff) | |
| parent | 51cdb30741e5ad3d6ec9dc8a5383dc84d60f747a (diff) | |
Merge pull request #2774 from mark-monteiro/simplify-https-config
Simplify HTTPS Properties
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/HttpListenerHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 211a0c1d9..01813fac1 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -424,9 +424,13 @@ namespace Emby.Server.Implementations.HttpServer 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) { - if (_config.Configuration.RequireHttps && _appHost.EnableHttps && !_config.Configuration.IsBehindProxy) + if (_config.Configuration.RequireHttps && _appHost.ListenWithHttps) { if (urlString.IndexOf("https://", StringComparison.OrdinalIgnoreCase) == -1) { |
