Skip to content

Commit 2364bba

Browse files
Check case insensitive for DDOS-GUARD (#17)
1 parent 97b5d64 commit 2364bba

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/FlareSolverrSharp/ChallengeDetector.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using System.Net;
45
using System.Net.Http;
@@ -40,7 +41,7 @@ private static bool IsCloudflareProtected(HttpResponseMessage response)
4041
responseHtml.Contains("<title>Access denied</title>") || // Cloudflare Blocked
4142
responseHtml.Contains("<title>Attention Required! | Cloudflare</title>") || // Cloudflare Blocked
4243
responseHtml.Trim().Equals("error code: 1020") || // Cloudflare Blocked
43-
responseHtml.Contains("<title>DDOS-GUARD</title>")) // DDOS-GUARD
44+
responseHtml.IndexOf("<title>DDOS-GUARD</title>", StringComparison.OrdinalIgnoreCase) > -1) // DDOS-GUARD
4445
return true;
4546
}
4647

@@ -54,4 +55,4 @@ private static bool IsCloudflareProtected(HttpResponseMessage response)
5455
}
5556

5657
}
57-
}
58+
}

0 commit comments

Comments
 (0)