Maintenance: Disable VCR for local IP connects e.g. Selenium server in Windows development environment.

This commit is contained in:
Rolf Schmidt 2020-09-02 15:10:42 +02:00 committed by Thorsten Eckel
parent 3fb9b05027
commit 518230e6cf

View file

@ -6,8 +6,8 @@ VCR.configure do |config|
config.ignore_request do |request| config.ignore_request do |request|
uri = URI(request.uri) uri = URI(request.uri)
['zammad.com', 'google.com', 'elasticsearch', 'selenium'].any? do |site| ['zammad.com', 'google.com', 'elasticsearch', 'selenium', /^192\.168\.\d+\.\d+$/].any? do |site|
uri.host.include?(site) site.is_a?(Regexp) ? uri.host.match?(site) : uri.host.include?(site)
end end
end end