Fixed: Remove unnecessary Torznab ApiKeyWhiteList

This commit is contained in:
ilike2burnthing 2024-01-09 06:04:08 +00:00 committed by GitHub
parent 79bf7e5b4c
commit d0a80f11c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -10,14 +10,9 @@ namespace NzbDrone.Core.Indexers.Torznab
{ {
public class TorznabSettingsValidator : AbstractValidator<TorznabSettings> public class TorznabSettingsValidator : AbstractValidator<TorznabSettings>
{ {
private static readonly string[] ApiKeyWhiteList =
{
"hd4free.xyz",
};
private static bool ShouldHaveApiKey(TorznabSettings settings) private static bool ShouldHaveApiKey(TorznabSettings settings)
{ {
return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c)); return settings.BaseUrl != null;
} }
private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled); private static readonly Regex AdditionalParametersRegex = new Regex(@"(&.+?\=.+?)+", RegexOptions.Compiled);