Skip to content

The Free Software Media System - Server Backend & API

Disable HTTPS in Kestrel if Certificate is null

Claus Viumf2062ba19bb3
diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs
index f7d9bad1b0..ae54606747 100644
--- a/Emby.Server.Implementations/ApplicationHost.cs
+++ b/Emby.Server.Implementations/ApplicationHost.cs
@@ -629,7 +629,7 @@ namespace Emby.Server.Implementations
{
options.ListenAnyIP(HttpPort);
- if (EnableHttps)
+ if (EnableHttps && Certificate != null)
{
options.ListenAnyIP(HttpsPort, listenOptions => { listenOptions.UseHttps(Certificate); });
}