diff options
| author | David <daullmer@gmail.com> | 2020-08-01 17:42:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-01 17:42:33 +0200 |
| commit | d50a02203650743f02016c13acfe9a45c3397d09 (patch) | |
| tree | 176cc960ac5c90cf05c561fd6786dd06f45e7aa4 /Jellyfin.Api/Auth/BaseAuthorizationHandler.cs | |
| parent | 2cb6eb984b82601147cc0bab2592d7ab896d495d (diff) | |
| parent | 52ba54a71b8290d45ed0cbf9f3673b66d99c62e1 (diff) | |
Merge pull request #3775 from crobibero/api-dynamic-hls
Move DynamicHlsService to Jellyfin.Api
Diffstat (limited to 'Jellyfin.Api/Auth/BaseAuthorizationHandler.cs')
| -rw-r--r-- | Jellyfin.Api/Auth/BaseAuthorizationHandler.cs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Jellyfin.Api/Auth/BaseAuthorizationHandler.cs b/Jellyfin.Api/Auth/BaseAuthorizationHandler.cs index 9fde175d0..495ff9d12 100644 --- a/Jellyfin.Api/Auth/BaseAuthorizationHandler.cs +++ b/Jellyfin.Api/Auth/BaseAuthorizationHandler.cs @@ -70,7 +70,7 @@ namespace Jellyfin.Api.Auth return false; } - var ip = NormalizeIp(_httpContextAccessor.HttpContext.Connection.RemoteIpAddress).ToString(); + var ip = RequestHelpers.NormalizeIp(_httpContextAccessor.HttpContext.Connection.RemoteIpAddress).ToString(); var isInLocalNetwork = _networkManager.IsInLocalNetwork(ip); // User cannot access remotely and user is remote if (!user.HasPermission(PermissionKind.EnableRemoteAccess) && !isInLocalNetwork) @@ -100,10 +100,5 @@ namespace Jellyfin.Api.Auth return true; } - - private static IPAddress NormalizeIp(IPAddress ip) - { - return ip.IsIPv4MappedToIPv6 ? ip.MapToIPv4() : ip; - } } } |
