mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Update ApiServiceCollectionExtensions.cs
This commit is contained in:
parent
f2c2beca0f
commit
1a44d34f50
@ -24,6 +24,7 @@ using Jellyfin.Server.Configuration;
|
|||||||
using Jellyfin.Server.Filters;
|
using Jellyfin.Server.Filters;
|
||||||
using Jellyfin.Server.Formatters;
|
using Jellyfin.Server.Formatters;
|
||||||
using MediaBrowser.Common.Json;
|
using MediaBrowser.Common.Json;
|
||||||
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
@ -171,9 +172,9 @@ namespace Jellyfin.Server.Extensions
|
|||||||
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
||||||
for (var i = 0; i < knownProxies.Count; i++)
|
for (var i = 0; i < knownProxies.Count; i++)
|
||||||
{
|
{
|
||||||
if (IPAddress.TryParse(knownProxies[i], out var address))
|
if (IPHost.TryParse(knownProxies[i], out var host))
|
||||||
{
|
{
|
||||||
options.KnownProxies.Add(address);
|
options.KnownProxies.Add(host.Address);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user