diff --git a/changelogs/unreleased/fix-http-proxy.yml b/changelogs/unreleased/fix-http-proxy.yml new file mode 100644 index 0000000000000000000000000000000000000000..806b7d0a38c635cfa3aa12761895c2998623dba6 --- /dev/null +++ b/changelogs/unreleased/fix-http-proxy.yml @@ -0,0 +1,5 @@ +--- +title: Fixed HTTP_PROXY environment not honored when reading remote traces. +merge_request: 19282 +author: NLR +type: fixed diff --git a/lib/gitlab/ci/trace/http_io.rb b/lib/gitlab/ci/trace/http_io.rb index cff924e27ef3042ead1aa1b2f180d782adc35403..8788af57a678cd99faeceff2481222333b34ee66 100644 --- a/lib/gitlab/ci/trace/http_io.rb +++ b/lib/gitlab/ci/trace/http_io.rb @@ -148,7 +148,7 @@ def in_range? def get_chunk unless in_range? - response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http| + response = Net::HTTP.start(uri.hostname, uri.port, proxy_from_env: true, use_ssl: uri.scheme == 'https') do |http| http.request(request) end