Merge pull request #12220 from bevanjkay/cloudflare-regex-extend
audit: extend cloudflare https audit exception regex
This commit is contained in:
commit
cfb896a813
@ -188,7 +188,7 @@ module Utils
|
|||||||
# Check if a URL is protected by CloudFlare (e.g. badlion.net and jaxx.io).
|
# Check if a URL is protected by CloudFlare (e.g. badlion.net and jaxx.io).
|
||||||
def url_protected_by_cloudflare?(details)
|
def url_protected_by_cloudflare?(details)
|
||||||
[403, 503].include?(details[:status].to_i) &&
|
[403, 503].include?(details[:status].to_i) &&
|
||||||
details[:headers].match?(/^Set-Cookie: __cfduid=/i) &&
|
details[:headers].match?(/^Set-Cookie: (__cfduid|__cf_bm)=/i) &&
|
||||||
details[:headers].match?(/^Server: cloudflare/i)
|
details[:headers].match?(/^Server: cloudflare/i)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user