webmock.rb 462 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. # allow requests to:
  3. # - Zammad webservices
  4. # - Google (calendar)
  5. # - exchange.example.com (MS Exchange TCR mocks)
  6. # - localhost (Selenium server control)
  7. allowed_sites = lambda do |uri|
  8. ['zammad.com', 'google.com', 'exchange.example.com'].any? do |site|
  9. uri.host.include?(site)
  10. end
  11. end
  12. WebMock.disable_net_connect!(
  13. allow: allowed_sites,
  14. allow_localhost: true
  15. )