mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-09 07:10:34 +02:00
Merge pull request #2969 from BaronGreenback/my-feature
http in development mode crashed -
This commit is contained in:
commit
176159d0a8
|
@ -297,7 +297,6 @@ 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 && appHost.Certificate != null)
|
if (appHost.EnableHttps && appHost.Certificate != null)
|
||||||
{
|
{
|
||||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||||
|
@ -308,11 +307,18 @@ namespace Jellyfin.Server
|
||||||
}
|
}
|
||||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||||
{
|
{
|
||||||
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
try
|
||||||
{
|
{
|
||||||
listenOptions.UseHttps();
|
options.Listen(address, appHost.HttpsPort, listenOptions =>
|
||||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
{
|
||||||
});
|
listenOptions.UseHttps();
|
||||||
|
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Failed to listen to HTTPS using the ASP.NET Core HTTPS development certificate. Please ensure it has been installed and set as trusted.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,11 +337,18 @@ namespace Jellyfin.Server
|
||||||
}
|
}
|
||||||
else if (builderContext.HostingEnvironment.IsDevelopment())
|
else if (builderContext.HostingEnvironment.IsDevelopment())
|
||||||
{
|
{
|
||||||
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
try
|
||||||
{
|
{
|
||||||
listenOptions.UseHttps();
|
options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
|
||||||
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
{
|
||||||
});
|
listenOptions.UseHttps();
|
||||||
|
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
catch (InvalidOperationException ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Failed to listen to HTTPS using the ASP.NET Core HTTPS development certificate. Please ensure it has been installed and set as trusted.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue