diff options
| author | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-01-19 19:29:51 +0000 |
|---|---|---|
| committer | BaronGreenback <jimcartlidge@yahoo.co.uk> | 2021-01-19 19:31:55 +0000 |
| commit | ab632b96fe64e9803bde8387b80aca2deeb478bf (patch) | |
| tree | fb678dd20e7903a665e26296769f73e63632344e /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | |
| parent | 9db8a4d88dd276c907cb44eddd3633f8ec83989a (diff) | |
renamed.
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
| -rw-r--r-- | Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs index f8626b6e0..4f65a31e0 100644 --- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs +++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs @@ -200,7 +200,7 @@ namespace Jellyfin.Server.Extensions } else { - ParseList(config, config.KnownProxies, options); + AddProxyAddresses(config, config.KnownProxies, options); } // Only set forward limit if we have some known proxies or some known networks. @@ -322,20 +322,20 @@ namespace Jellyfin.Server.Extensions } /// <summary> - /// Sets up the proxy configuration based on the addresses in <paramref name="userList"/>. + /// Sets up the proxy configuration based on the addresses in <paramref name="allowedProxies"/>. /// </summary> /// <param name="config">The <see cref="NetworkConfiguration"/> containing the config settings.</param> - /// <param name="userList">The string array to parse.</param> + /// <param name="allowedProxies">The string array to parse.</param> /// <param name="options">The <see cref="ForwardedHeadersOptions"/> instance.</param> - internal static void ParseList(NetworkConfiguration config, string[] userList, ForwardedHeadersOptions options) + internal static void AddProxyAddresses(NetworkConfiguration config, string[] allowedProxies, ForwardedHeadersOptions options) { - for (var i = 0; i < userList.Length; i++) + for (var i = 0; i < allowedProxies.Length; i++) { - if (IPNetAddress.TryParse(userList[i], out var addr)) + if (IPNetAddress.TryParse(allowedProxies[i], out var addr)) { AddIpAddress(config, options, addr.Address, addr.PrefixLength); } - else if (IPHost.TryParse(userList[i], out var host)) + else if (IPHost.TryParse(allowedProxies[i], out var host)) { foreach (var address in host.GetAddresses()) { |
