diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2020-12-05 16:00:34 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-05 16:00:34 +0000 |
| commit | 1a44d34f50834003306ffd7b7687d5e9ef20b708 (patch) | |
| tree | 582861db354caa3f07bd423c7eebd2e93803db09 | |
| parent | f2c2beca0f9a249edd7cc967c328d32ebdc30092 (diff) | |
Update ApiServiceCollectionExtensions.cs
| -rw-r--r-- | Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index 74e7bb4b1..4995fe6a3 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -24,6 +24,7 @@ using Jellyfin.Server.Configuration; using Jellyfin.Server.Filters; using Jellyfin.Server.Formatters; using MediaBrowser.Common.Json; +using MediaBrowser.Common.Net; using MediaBrowser.Model.Entities; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authorization; @@ -171,9 +172,9 @@ namespace Jellyfin.Server.Extensions options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; for (var i = 0; i < knownProxies.Count; i++) { - if (IPAddress.TryParse(knownProxies[i], out var address)) + if (IPHost.TryParse(knownProxies[i], out var host)) { - options.KnownProxies.Add(address); + options.KnownProxies.Add(host.Address); } } }) |
