aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/ApplicationHost.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2026-08-02 22:12:57 +0200
committerShadowghost <Ghost_of_Stone@web.de>2026-08-02 22:12:57 +0200
commit80445347740955f0121fec5d1bf649212da3c63b (patch)
treebeb9ccb575879d8cc14d21fdd7fee6f8188d21c6 /Emby.Server.Implementations/ApplicationHost.cs
parent705368ee495cfb8967d3f1651318fbdb85ad89e6 (diff)
parentcac463d4c3c6eee34dff4faec95b8de2c639bd44 (diff)
Merge remote-tracking branch 'upstream/master' into fix-byname-queries
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
-rw-r--r--Emby.Server.Implementations/ApplicationHost.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index 0c1c7d3f5b..1a54565863 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -987,8 +987,9 @@ namespace Emby.Server.Implementations
/// <inheritdoc/>
public string GetLocalApiUrl(string hostname, string scheme = null, int? port = null)
{
- // If the smartAPI doesn't start with http then treat it as a host or ip.
- if (hostname.StartsWith("http", StringComparison.OrdinalIgnoreCase))
+ // If the smartAPI isn't already a complete URL then treat it as a host or ip.
+ if (hostname.StartsWith("http://", StringComparison.OrdinalIgnoreCase)
+ || hostname.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
{
return hostname.TrimEnd('/');
}