lib/cms_scanner/finders/finder/enumerator.rb in cms_scanner-0.0.39.3 vs lib/cms_scanner/finders/finder/enumerator.rb in cms_scanner-0.0.39.4
- old
+ new
@@ -17,10 +17,13 @@
request.on_complete do |res|
progress_bar.increment
next if target.homepage_or_404?(res)
- next if opts[:exclude_content] && res.body.match(opts[:exclude_content])
+
+ if opts[:exclude_content]
+ next if res.response_headers&.match(opts[:exclude_content]) || res.body.match(opts[:exclude_content])
+ end
yield res, id
end
hydra.queue(request)