mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07:00
Enable HTTP/2 support
This commit is contained in:
parent
2184553d15
commit
1fb939b9b2
@ -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;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user