summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelogs/unreleased/fix-http-proxy.yml5
-rw-r--r--lib/gitlab/ci/trace/http_io.rb2
2 files changed, 6 insertions, 1 deletions
diff --git a/changelogs/unreleased/fix-http-proxy.yml b/changelogs/unreleased/fix-http-proxy.yml
new file mode 100644
index 00000000000..806b7d0a38c
--- /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 cff924e27ef..8788af57a67 100644
--- a/lib/gitlab/ci/trace/http_io.rb
+++ b/lib/gitlab/ci/trace/http_io.rb
@@ -148,7 +148,7 @@ module Gitlab
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