Commit 886bbfed authored by Toon Claes's avatar Toon Claes

Make webmock allow requests to webpack too

parent 6318b5d9
...@@ -8,7 +8,11 @@ def webmock_allowed_hosts ...@@ -8,7 +8,11 @@ def webmock_allowed_hosts
if ENV.key?('ELASTIC_URL') if ENV.key?('ELASTIC_URL')
hosts << URI.parse(ENV['ELASTIC_URL']).host hosts << URI.parse(ENV['ELASTIC_URL']).host
end end
end.uniq
if Gitlab.config.webpack&.dev_server&.enabled
hosts << Gitlab.config.webpack.dev_server.host
end
end.compact.uniq
end end
WebMock.disable_net_connect!(allow_localhost: true, allow: webmock_allowed_hosts) WebMock.disable_net_connect!(allow_localhost: true, allow: webmock_allowed_hosts)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment