Merge pull request #4403 from Bond-009/http2
Http1AndHttp2 is the default, no need to explicitly enable it
This commit is contained in:
commit
f23836c6a4
|
@ -290,23 +290,19 @@ namespace Jellyfin.Server
|
|||
{
|
||||
_logger.LogInformation("Kestrel listening on {IpAddress}", address);
|
||||
options.Listen(address, appHost.HttpPort);
|
||||
|
||||
if (appHost.ListenWithHttps)
|
||||
{
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
options.Listen(
|
||||
address,
|
||||
appHost.HttpsPort,
|
||||
listenOptions => listenOptions.UseHttps(appHost.Certificate));
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
{
|
||||
try
|
||||
{
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps();
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
options.Listen(address, appHost.HttpsPort, listenOptions => listenOptions.UseHttps());
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
|
@ -322,21 +318,15 @@ namespace Jellyfin.Server
|
|||
|
||||
if (appHost.ListenWithHttps)
|
||||
{
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps(appHost.Certificate);
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
options.ListenAnyIP(
|
||||
appHost.HttpsPort,
|
||||
listenOptions => listenOptions.UseHttps(appHost.Certificate));
|
||||
}
|
||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||
{
|
||||
try
|
||||
{
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||
{
|
||||
listenOptions.UseHttps();
|
||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||
});
|
||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions => listenOptions.UseHttps());
|
||||
}
|
||||
catch (InvalidOperationException ex)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user