diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-09-10 14:10:26 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-10 14:10:26 +0000 |
| commit | 4447589460b00fc65acf1129c816ebeba9e87616 (patch) | |
| tree | 6ded68d18452e6b71bd87a460e21ad46a94080cb /Jellyfin.Api/Helpers/RequestHelpers.cs | |
| parent | 621f3b705052f628e27fb975a8bb809853742ad8 (diff) | |
| parent | cb173d79e6f0c192be88eb6466d9cd52a9ee0e46 (diff) | |
Merge pull request #4116 from cvium/add_known_proxies
Add Known Proxies to system configuration
Diffstat (limited to 'Jellyfin.Api/Helpers/RequestHelpers.cs')
| -rw-r--r-- | Jellyfin.Api/Helpers/RequestHelpers.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Jellyfin.Api/Helpers/RequestHelpers.cs b/Jellyfin.Api/Helpers/RequestHelpers.cs index fbaa69270..8dcf08af5 100644 --- a/Jellyfin.Api/Helpers/RequestHelpers.cs +++ b/Jellyfin.Api/Helpers/RequestHelpers.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Net; using Jellyfin.Data.Enums; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Session; using MediaBrowser.Model.Querying; @@ -119,7 +120,7 @@ namespace Jellyfin.Api.Helpers authorization.Version, authorization.DeviceId, authorization.Device, - request.HttpContext.Connection.RemoteIpAddress.ToString(), + request.HttpContext.GetNormalizedRemoteIp(), user); if (session == null) @@ -172,10 +173,5 @@ namespace Jellyfin.Api.Helpers .Select(i => i!.Value) .ToArray(); } - - internal static IPAddress NormalizeIp(IPAddress ip) - { - return ip.IsIPv4MappedToIPv6 ? ip.MapToIPv4() : ip; - } } } |
