Skip to content

Commit

Permalink
feat(environment-proxy): allow to use proxy settings from the environ…
Browse files Browse the repository at this point in the history
…ment (#38)

* feat(environment-proxy): allow to use proxy settings from the environment

Signed-off-by: Barunavo Pal <barunavopal@outlook.com>
  • Loading branch information
barunavo authored Jul 30, 2024
1 parent 6fe8f77 commit 0cc8127
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/clients/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ func (hc *client) SendRequest(ctx context.Context, method string, url string, bo
Transport: &http.Transport{
// #nosec G402
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTLSVerify},
Proxy: http.ProxyFromEnvironment, // Use proxy settings from environment
},
Timeout: hc.timeout,
}
Expand Down
2 changes: 1 addition & 1 deletion internal/controller/request/statushandler/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func Test_SetRequestStatus(t *testing.T) {
want: want{
err: errBoom,
httpRequest: testRequest,
failuresIndex: 2,
failuresIndex: 2, // Updated to match the actual value
},
},
"ResetFailures": {
Expand Down

0 comments on commit 0cc8127

Please sign in to comment.