2969 - re-issed code to address when developer doesn't have certificate installed.
This commit is contained in:
parent
d1684b1053
commit
a0a5512069
|
@ -272,9 +272,7 @@ namespace Jellyfin.Server
|
||||||
{
|
{
|
||||||
_logger.LogInformation("Kestrel listening on {IpAddress}", address);
|
_logger.LogInformation("Kestrel listening on {IpAddress}", address);
|
||||||
options.Listen(address, appHost.HttpPort);
|
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 =>
|
||||||
{
|
{
|
||||||
|
@ -283,6 +281,8 @@ namespace Jellyfin.Server
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||||
{
|
{
|
||||||
|
@ -290,6 +290,10 @@ namespace Jellyfin.Server
|
||||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error whilst listing to https - Is a development certificate installed?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -298,9 +302,7 @@ namespace Jellyfin.Server
|
||||||
_logger.LogInformation("Kestrel listening on all interfaces");
|
_logger.LogInformation("Kestrel listening on all interfaces");
|
||||||
options.ListenAnyIP(appHost.HttpPort);
|
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 =>
|
||||||
{
|
{
|
||||||
|
@ -309,6 +311,8 @@ namespace Jellyfin.Server
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||||
{
|
{
|
||||||
|
@ -316,6 +320,10 @@ namespace Jellyfin.Server
|
||||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Error whilst listing to https - Is a development certificate installed?");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user