2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2018-08-29 19:50:12 +00:00
|
|
|
# allow requests to:
|
|
|
|
# - Zammad webservices
|
|
|
|
# - Google (calendar)
|
2018-09-28 15:05:01 +00:00
|
|
|
# - exchange.example.com (MS Exchange TCR mocks)
|
|
|
|
# - localhost (Selenium server control)
|
2018-08-29 19:50:12 +00:00
|
|
|
allowed_sites = lambda do |uri|
|
2018-09-04 09:49:44 +00:00
|
|
|
['zammad.com', 'google.com', 'exchange.example.com'].any? do |site|
|
2018-08-29 19:50:12 +00:00
|
|
|
uri.host.include?(site)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
WebMock.disable_net_connect!(
|
|
|
|
allow: allowed_sites,
|
|
|
|
allow_localhost: true
|
|
|
|
)
|