audit: extend cloudflare https audit exception regex

This commit is contained in:
Bevan Kay 2021-10-11 15:52:37 +11:00
parent 1eaf8dbbec
commit 70ac4d70d2
No known key found for this signature in database
GPG Key ID: 479C98436A4773B9

View File

@ -188,7 +188,7 @@ module Utils
# Check if a URL is protected by CloudFlare (e.g. badlion.net and jaxx.io).
def url_protected_by_cloudflare?(details)
[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)
end