diff options
| author | Bond-009 <bond.009@outlook.com> | 2023-08-26 17:28:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-26 17:28:34 +0200 |
| commit | 9ae429b6f64531a2f063a04d0fdd31cceb16a9b5 (patch) | |
| tree | af2dce1e454665f90ea69ef3c752680db73d2be7 /Emby.Server.Implementations/ApplicationHost.cs | |
| parent | 3ee1141a06d41ac080cd5fd6b2253e1ed23d675e (diff) | |
| parent | 18a311d32fd6e3cdfed466017bda46566a013106 (diff) | |
Merge pull request #10141 from Bond-009/nullable3
Diffstat (limited to 'Emby.Server.Implementations/ApplicationHost.cs')
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index dd90a8950..8b13ccada 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -1006,7 +1006,7 @@ namespace Emby.Server.Implementations if (ConfigurationManager.GetNetworkConfiguration().EnablePublishedServerUriByRequest) { int? requestPort = request.Host.Port; - if (requestPort == null + if (requestPort is null || (requestPort == 80 && string.Equals(request.Scheme, "http", StringComparison.OrdinalIgnoreCase)) || (requestPort == 443 && string.Equals(request.Scheme, "https", StringComparison.OrdinalIgnoreCase))) { @@ -1190,7 +1190,7 @@ namespace Emby.Server.Implementations } } - if (_sessionManager != null) + if (_sessionManager is not null) { // used for closing websockets foreach (var session in _sessionManager.Sessions) |
