diff --git a/src/NzbDrone.Core/Http/CloudFlare/CloudFlareDetectionService.cs b/src/NzbDrone.Core/Http/CloudFlare/CloudFlareDetectionService.cs index 5acf1c8e6..54dc2338e 100644 --- a/src/NzbDrone.Core/Http/CloudFlare/CloudFlareDetectionService.cs +++ b/src/NzbDrone.Core/Http/CloudFlare/CloudFlareDetectionService.cs @@ -1,7 +1,7 @@ +using System; using System.Collections.Generic; using System.Linq; using System.Net; -using System.Text.RegularExpressions; using NLog; using NzbDrone.Common.Http; @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Http.CloudFlare { public class CloudFlareDetectionService { - private static readonly HashSet CloudflareServerNames = new HashSet { "cloudflare", "cloudflare-nginx", "ddos-guard" }; + private static readonly HashSet CloudflareServerNames = new () { "cloudflare", "cloudflare-nginx", "ddos-guard" }; private readonly Logger _logger; public CloudFlareDetectionService(Logger logger) @@ -33,7 +33,7 @@ namespace NzbDrone.Core.Http.CloudFlare responseHtml.Contains("Access denied") || responseHtml.Contains("Attention Required! | Cloudflare") || responseHtml.Trim().Equals("error code: 1020") || - responseHtml.Contains("DDOS-GUARD")) + responseHtml.Contains("DDOS-GUARD", StringComparison.OrdinalIgnoreCase)) { return true; }