mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-28 11:44:48 +03:00
2969 - re-issed code to address when developer doesn't have certificate installed.
This commit is contained in:
@@ -272,17 +272,17 @@ namespace Jellyfin.Server
|
||||
{
|
||||
_logger.LogInformation("Kestrel listening on {IpAddress}", address);
|
||||
options.Listen(address, appHost.HttpPort);
|
||||
if (appHost.EnableHttps)
|
||||
if (appHost.EnableHttps && appHost.Certificate != null)
|
||||
{
|
||||
if (appHost.Certificate != null)
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
{
|
||||
try
|
||||
{
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
@@ -290,6 +290,10 @@ namespace Jellyfin.Server
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error whilst listing to https - Is a development certificate installed?");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,17 +302,17 @@ namespace Jellyfin.Server
|
||||
_logger.LogInformation("Kestrel listening on all interfaces");
|
||||
options.ListenAnyIP(appHost.HttpPort);
|
||||
|
||||
if (appHost.EnableHttps)
|
||||
if (appHost.EnableHttps && appHost.Certificate != null)
|
||||
{
|
||||
if (appHost.Certificate != null)
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
{
|
||||
try
|
||||
{
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
@@ -316,6 +320,10 @@ namespace Jellyfin.Server
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error whilst listing to https - Is a development certificate installed?");
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user