diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-11-19 09:18:25 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-19 09:18:25 -0700 |
| commit | 752bb88445ca8880d7a7a59027a534a03d894a01 (patch) | |
| tree | 5ae82182bb4a439696b4fb62016db5fa8d4694c1 /Emby.Server.Implementations | |
| parent | 0009e5cc27d4c1e1e224067af9b8089c5ec41850 (diff) | |
| parent | a263f3978ba47968274062f9c1bef445b4b946bd (diff) | |
Merge pull request #6871 from cvium/fix_localapiurl
Diffstat (limited to 'Emby.Server.Implementations')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 99ad9fdf4..903c31133 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1128,12 +1128,12 @@ namespace Emby.Server.Implementations } /// <inheritdoc/> - public string GetApiUrlForLocalAccess(bool allowHttps) + public string GetApiUrlForLocalAccess(bool allowHttps = true) { // With an empty source, the port will be null string smart = NetManager.GetBindInterface(string.Empty, out _); - var scheme = allowHttps ? Uri.UriSchemeHttps : Uri.UriSchemeHttp; - var port = allowHttps ? HttpsPort : HttpPort; + var scheme = !allowHttps ? Uri.UriSchemeHttp : null; + int? port = !allowHttps ? HttpPort : null; return GetLocalApiUrl(smart.Trim('/'), scheme, port); } |
