aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2020-09-10 14:16:41 +0200
committercvium <clausvium@gmail.com>2020-09-10 14:16:41 +0200
commit7576824cee0dc0d8e1729ae0a7e8e4f256b71efd (patch)
tree6ceccabcbc8555de3275ae4cf6e59e8fd013584b /Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs
parent78cab77f819e8d8b283f95f2e48f635bcf66fea5 (diff)
Standardize use of IsLocal and RemoteIp
Diffstat (limited to 'Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs')
-rw-r--r--Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs b/Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs
index 59b5fb1ed..4bda8f273 100644
--- a/Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs
+++ b/Jellyfin.Server/Middleware/IpBasedAccessValidationMiddleware.cs
@@ -32,13 +32,13 @@ namespace Jellyfin.Server.Middleware
/// <returns>The async task.</returns>
public async Task Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
{
- if (httpContext.Request.IsLocal())
+ if (httpContext.IsLocal())
{
await _next(httpContext).ConfigureAwait(false);
return;
}
- var remoteIp = httpContext.Request.RemoteIp();
+ var remoteIp = httpContext.GetNormalizedRemoteIp();
if (serverConfigurationManager.Configuration.EnableRemoteAccess)
{