Merge pull request #4636 from jellyfin/MissedOne

[Fix for 10.7] Missed a config move
This commit is contained in:
Claus Vium 2020-12-03 08:10:02 +01:00 committed by GitHub
commit fdd8b34cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,8 @@ namespace Jellyfin.Server
app.UseBaseUrlRedirection();
// Wrap rest of configuration so everything only listens on BaseUrl.
app.Map(_serverConfigurationManager.GetNetworkConfiguration().BaseUrl, mainApp =>
var config = _serverConfigurationManager.GetNetworkConfiguration();
app.Map(config.BaseUrl, mainApp =>
{
if (env.IsDevelopment())
{
@ -122,8 +123,7 @@ namespace Jellyfin.Server
mainApp.UseCors();
if (_serverConfigurationManager.GetNetworkConfiguration().RequireHttps
&& _serverApplicationHost.ListenWithHttps)
if (config.RequireHttps && _serverApplicationHost.ListenWithHttps)
{
mainApp.UseHttpsRedirection();
}