mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 03:34:46 +03:00
Standardize use of IsLocal and RemoteIp
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user