aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaus Vium <cvium@users.noreply.github.com>2022-10-21 17:44:27 +0200
committerGitHub <noreply@github.com>2022-10-21 17:44:27 +0200
commit7eae6891c88aa34f06bd4ed9ae6a7f55ebc82e77 (patch)
tree64fbeb11707f2830ca9dda254ddc4e717c725a4c
parent509c6ec24ca35b2e16561808792cd581c5f9d8fc (diff)
parentb7882db9c72e2a07d7814e7eaf038d69837b4972 (diff)
Merge pull request #8603 from Shadowghost/master-slow-load
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs10
1 files changed, 1 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 909972469..8db55a6ae 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -1088,15 +1088,7 @@ namespace Emby.Server.Implementations
return GetLocalApiUrl(request.Host.Host, request.Scheme, requestPort);
}
- // Published server ends with a /
- if (!string.IsNullOrEmpty(PublishedServerUrl))
- {
- // Published server ends with a '/', so we need to remove it.
- return PublishedServerUrl.Trim('/');
- }
-
- string smart = NetManager.GetBindInterface(request, out var port);
- return GetLocalApiUrl(smart.Trim('/'), request.Scheme, port);
+ return GetSmartApiUrl(request.HttpContext.Connection.RemoteIpAddress ?? IPAddress.Loopback);
}
/// <inheritdoc/>