Merge pull request #8612 from reitermarkus/audit-cloudflare-protection
Ignore URLs protected by CloudFlare when auditing.
This commit is contained in:
commit
9e0a26a2fc
@ -141,6 +141,13 @@ def curl_check_http_content(url, user_agents: [:default], check_content: false,
|
||||
end
|
||||
|
||||
unless http_status_ok?(details[:status])
|
||||
# Check if the URL is protected by CloudFlare.
|
||||
if details[:status].to_i == 503 &&
|
||||
details[:file].include?("set-cookie: __cfduid=") &&
|
||||
details[:file].include?("server: cloudflare")
|
||||
return
|
||||
end
|
||||
|
||||
return "The URL #{url} is not reachable (HTTP status code #{details[:status]})"
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user