aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-10-26 07:17:42 -0600
committerGitHub <noreply@github.com>2022-10-26 07:17:42 -0600
commit2d8b375a648d6c69796aedcbfe55591468273f60 (patch)
tree1d6395ab0a62bf5d6dc10ac3db787b5f53aa6a09 /Emby.Server.Implementations/ApplicationHost.cs
parent260346c24b02a2878201c9c5de69aea4f50350e9 (diff)
parent790f67aac11e5c32bad19126d4e35b2afa259006 (diff)
Merge branch 'master' into renovate/dotnet-monorepo
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-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/>