aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaronGreenback <jimcartlidge@yahoo.co.uk>2021-01-12 13:23:10 +0000
committerBaronGreenback <jimcartlidge@yahoo.co.uk>2021-01-12 13:23:10 +0000
commit2979c8dd377bf0948be00082b97416b38c21de56 (patch)
treea260aa83b2c3b5829d41cb9f88c693c582d9a6d5
parent35a30c9d098e7ac5fcaf7d86a4cc616deb8a2cfa (diff)
Fixed test on Mac
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs2
-rw-r--r--tests/Jellyfin.Api.Tests/ParseNetworkTests.cs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 4f6329f82..2d03c129e 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -274,8 +274,8 @@ namespace Jellyfin.Server.Extensions
options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
if (config.KnownProxies.Length == 0)
{
- options.KnownProxies.Clear();
options.KnownNetworks.Clear();
+ options.KnownProxies.Clear();
}
else
{
diff --git a/tests/Jellyfin.Api.Tests/ParseNetworkTests.cs b/tests/Jellyfin.Api.Tests/ParseNetworkTests.cs
index 3a9f0a079..f4ea45cc2 100644
--- a/tests/Jellyfin.Api.Tests/ParseNetworkTests.cs
+++ b/tests/Jellyfin.Api.Tests/ParseNetworkTests.cs
@@ -48,8 +48,8 @@ namespace Jellyfin.Api.Tests
/// <param name="hostList">List to parse.</param>
/// <param name="match">What it should match.</param>
[Theory]
- [InlineData(true, true, "192.168.0.0/16,www.yahoo.co.uk", "::ffff:212.82.100.150,::ffff:192.168.0.0/16")]
- [InlineData(true, false, "192.168.0.0/16,www.yahoo.co.uk", "212.82.100.150,192.168.0.0/16")]
+ // [InlineData(true, true, "192.168.0.0/16,www.yahoo.co.uk", "::ffff:212.82.100.150,::ffff:192.168.0.0/16")] <- fails on Max. www.yahoo.co.uk resolves to a different ip address.
+ // [InlineData(true, false, "192.168.0.0/16,www.yahoo.co.uk", "212.82.100.150,192.168.0.0/16")]
[InlineData(true, true, "192.168.t,127.0.0.1,1234.1232.12.1234", "::ffff:127.0.0.1")]
[InlineData(true, false, "192.168.x,127.0.0.1,1234.1232.12.1234", "127.0.0.1")]
[InlineData(true, true, "::1", "::1/128")]