diff options
| author | crobibero <cody@robibe.ro> | 2020-07-31 15:09:17 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-07-31 15:09:17 -0600 |
| commit | f645e2f8841577d7f1cd3a664d401c8c1837cca0 (patch) | |
| tree | 0f4c05d16c97647bf7290d6b75ff1345ffaa6b33 /Jellyfin.Api/Auth/BaseAuthorizationHandler.cs | |
| parent | 2cb6eb984b82601147cc0bab2592d7ab896d495d (diff) | |
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; - } } } |
