Skip to content

The Free Software Media System - Server Backend & API

Merge remote-tracking branch 'upstream/master' into development-https

Mark Monteiro0e57348cf453
diff --cc Jellyfin.Server/Program.cs
index 3d082d86bc,5766a9dc36..94a4164adb
--- a/Jellyfin.Server/Program.cs
+++ b/Jellyfin.Server/Program.cs
@@@ -18,9 -18,9 +18,10 @@@ using Emby.Server.Implementations.Netwo
using Jellyfin.Drawing.Skia;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Drawing;
- using MediaBrowser.Model.Globalization;
+ using MediaBrowser.Controller.Extensions;
+ using MediaBrowser.WebDashboard.Api;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Server.Kestrel.Core;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
@@@ -235,10 -250,15 +252,15 @@@ namespace Jellyfin.Serve
}
}
- private static IWebHostBuilder CreateWebHostBuilder(ApplicationHost appHost, IServiceCollection serviceCollection, IApplicationPaths appPaths)
+ private static IWebHostBuilder CreateWebHostBuilder(
+ ApplicationHost appHost,
+ IServiceCollection serviceCollection,
+ StartupOptions commandLineOpts,
+ IConfiguration startupConfig,
+ IApplicationPaths appPaths)
{
return new WebHostBuilder()
- .UseKestrel(options =>
+ .UseKestrel((builderContext, options) =>
{
var addresses = appHost.ServerConfigurationManager
.Configuration
@@@ -281,19 -293,10 +303,18 @@@
appHost.HttpsPort,
listenOptions => listenOptions.UseHttps(appHost.Certificate));
}
+ else if (builderContext.HostingEnvironment.IsDevelopment())
+ {
+ options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
+ {
+ listenOptions.UseHttps();
+ listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
+ });
+ }
}
})
- .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(appPaths))
+ .ConfigureAppConfiguration(config => config.ConfigureAppConfiguration(commandLineOpts, appPaths, startupConfig))
.UseSerilog()
- .UseContentRoot(appHost.ContentRoot)
.ConfigureServices(services =>
{
// Merge the external ServiceCollection into ASP.NET DI
diff --cc Jellyfin.Server/Properties/launchSettings.json
index 9140f552b9,53d9fe1656..898819f5f6
--- a/Jellyfin.Server/Properties/launchSettings.json
+++ b/Jellyfin.Server/Properties/launchSettings.json
@@@ -1,10 -1,11 +1,17 @@@
{
"profiles": {
"Jellyfin.Server": {
- "commandName": "Project"
+ "commandName": "Project",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Jellyfin.Server (nowebclient)": {
+ "commandName": "Project",
- "commandLineArgs": "--nowebclient"
++ "commandLineArgs": "--nowebclient",
++ "environmentVariables": {
++ "ASPNETCORE_ENVIRONMENT": "Development"
++ }
}
}
}