Enable HTTP/2 support

This commit is contained in:
Mark Monteiro 2020-03-21 20:21:07 +01:00
parent 2184553d15
commit 1fb939b9b2

View File

@ -20,6 +20,7 @@ using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Drawing;
using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Globalization;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
@ -253,10 +254,11 @@ namespace Jellyfin.Server
if (appHost.EnableHttps && appHost.Certificate != null) if (appHost.EnableHttps && appHost.Certificate != null)
{ {
options.Listen( options.Listen(address, appHost.HttpsPort, listenOptions =>
address, {
appHost.HttpsPort, listenOptions.UseHttps(appHost.Certificate);
listenOptions => listenOptions.UseHttps(appHost.Certificate)); listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
});
} }
} }
} }
@ -267,9 +269,11 @@ namespace Jellyfin.Server
if (appHost.EnableHttps && appHost.Certificate != null) if (appHost.EnableHttps && appHost.Certificate != null)
{ {
options.ListenAnyIP( options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
appHost.HttpsPort, {
listenOptions => listenOptions.UseHttps(appHost.Certificate)); listenOptions.UseHttps(appHost.Certificate);
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
});
} }
} }
}) })