Fixed: Trim spaces and empty values in Proxy Bypass List

(cherry picked from commit 846333ddf0d9da775c80d004fdb9b41e700ef359)

Closes #3688
This commit is contained in:
bakerboy448
2024-08-25 19:24:16 -05:00
committed by Bogdan
parent 305ad235a5
commit 7dfceb307b

View File

@@ -1,3 +1,4 @@
using System;
using NzbDrone.Common.Extensions;
namespace NzbDrone.Common.Http.Proxy
@@ -29,7 +30,8 @@ namespace NzbDrone.Common.Http.Proxy
{
if (!string.IsNullOrWhiteSpace(BypassFilter))
{
var hostlist = BypassFilter.Split(',');
var hostlist = BypassFilter.Split(',', StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);
for (var i = 0; i < hostlist.Length; i++)
{
if (hostlist[i].StartsWith("*"))
@@ -41,7 +43,7 @@ namespace NzbDrone.Common.Http.Proxy
return hostlist;
}
return new string[] { };
return Array.Empty<string>();
}
}