diff options
| author | cvium <clausvium@gmail.com> | 2020-09-10 14:16:41 +0200 |
|---|---|---|
| committer | cvium <clausvium@gmail.com> | 2020-09-10 14:16:41 +0200 |
| commit | 7576824cee0dc0d8e1729ae0a7e8e4f256b71efd (patch) | |
| tree | 6ceccabcbc8555de3275ae4cf6e59e8fd013584b /Jellyfin.Api/Controllers/SystemController.cs | |
| parent | 78cab77f819e8d8b283f95f2e48f635bcf66fea5 (diff) | |
Standardize use of IsLocal and RemoteIp
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 bbfd163de..34c7bb18d 100644 --- a/Jellyfin.Api/Controllers/SystemController.cs +++ b/Jellyfin.Api/Controllers/SystemController.cs @@ -7,6 +7,7 @@ using System.Threading; using System.Threading.Tasks; using Jellyfin.Api.Constants; using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Extensions; using MediaBrowser.Common.Net; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; @@ -176,8 +177,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()) }; } |
