This is an automated email from the ASF dual-hosted git repository.

zeroshade pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git


The following commit(s) were added to refs/heads/main by this push:
     new f0b9fcb  Allow HTTP proxy to be used to talk to REST catalog server 
(#420)
f0b9fcb is described below

commit f0b9fcba7985d886ff83ba1f1e25b7ae079e5715
Author: Joshua Humphries <[email protected]>
AuthorDate: Tue May 6 18:33:21 2025 -0400

    Allow HTTP proxy to be used to talk to REST catalog server (#420)
    
    This one-liner uses the "net/http" package's built-in support for HTTP
    proxies, activated via standard environment variables like `HTTP_PROXY`,
    `HTTPS_PROXY`, and `NO_PROXY`.
---
 catalog/rest/rest.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/catalog/rest/rest.go b/catalog/rest/rest.go
index e14e8b0..9491649 100644
--- a/catalog/rest/rest.go
+++ b/catalog/rest/rest.go
@@ -558,7 +558,7 @@ func (r *Catalog) fetchAccessToken(cl *http.Client, creds 
string, opts *options)
 
 func (r *Catalog) createSession(ctx context.Context, opts *options) 
(*http.Client, error) {
        session := &sessionTransport{
-               Transport:      http.Transport{TLSClientConfig: opts.tlsConfig},
+               Transport:      http.Transport{Proxy: 
http.ProxyFromEnvironment, TLSClientConfig: opts.tlsConfig},
                defaultHeaders: http.Header{},
        }
        cl := &http.Client{Transport: session}

Reply via email to