Update Startup.cs

This commit is contained in:
BaronGreenback 2020-11-22 11:40:50 +00:00 committed by GitHub
parent a57b99bffd
commit a34fca6f8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ using Jellyfin.Networking.Configuration;
using Jellyfin.Server.Extensions; using Jellyfin.Server.Extensions;
using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations;
using Jellyfin.Server.Middleware; using Jellyfin.Server.Middleware;
using Jellyfin.Server.Networking;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Controller; using MediaBrowser.Controller;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
@ -122,7 +123,7 @@ namespace Jellyfin.Server
mainApp.UseCors(); mainApp.UseCors();
if (_serverConfigurationManager.Configuration.RequireHttps if (_serverConfigurationManager.GetNetworkConfiguration().RequireHttps
&& _serverApplicationHost.ListenWithHttps) && _serverApplicationHost.ListenWithHttps)
{ {
mainApp.UseHttpsRedirection(); mainApp.UseHttpsRedirection();