diff options
| author | Patrick Barron <barronpm@gmail.com> | 2020-05-13 15:35:44 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2020-05-13 15:35:44 -0400 |
| commit | 1fecd55ac053afc1e785da7183f35e0e819336b3 (patch) | |
| tree | dafa482f3a0735cb64b60a798bd56a9199aa8bf6 /Emby.Server.Implementations/HttpServer/HttpListenerHost.cs | |
| parent | 1e9b2613c690f4afe561eb8401705834bb51b6b8 (diff) | |
| parent | a8f0d0aa0dfe589f4dd5148d0c328bf83271ffb2 (diff) | |
Merge branch 'activitydb-efcore' of https://github.com/barronpm/jellyfin into activitydb-efcore
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) { |
