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/Controllers/SystemController.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/Controllers/SystemController.cs')
| -rw-r--r-- | Jellyfin.Api/Controllers/SystemController.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Jellyfin.Api/Controllers/SystemController.cs b/Jellyfin.Api/Controllers/SystemController.cs index e878e8f36..8052c4c0c 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Jellyfin.Api.Attributes; using Jellyfin.Api.Constants; using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; @@ -178,8 +179,8 @@ namespace Jellyfin.Api.Controllers { return new EndPointInfo { - IsLocal = Request.HttpContext.Connection.LocalIpAddress.Equals(Request.HttpContext.Connection.RemoteIpAddress), - IsInNetwork = _network.IsInLocalNetwork(Request.HttpContext.Connection.RemoteIpAddress.ToString()) + IsLocal = HttpContext.IsLocal(), + IsInNetwork = _network.IsInLocalNetwork(HttpContext.GetNormalizedRemoteIp()) }; } |
