From 8a8852ac9a48b54490029fcdd077c3f20191b09f Mon Sep 17 00:00:00 2001 From: Matheus Moraes Date: Tue, 21 Nov 2023 17:43:48 -0300 Subject: [PATCH] feat: add http proxy support in http client --- cmd/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/main.go b/cmd/main.go index a6fd66ad..59e88039 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -108,8 +108,9 @@ func main() { var onClusterUpdate, onClusterDelete saas.ClusterHook var onClusterScanUpdate, onClusterScanDelete saas.ClusterScanHook + client := &http.Client{Transport: &http.Transport{Proxy: http.ProxyFromEnvironment}} if saasWorkspaceID != "" { - saasClient, err := saas.NewClient(saasServer, version, saasWorkspaceID, http.DefaultClient) + saasClient, err := saas.NewClient(saasServer, version, saasWorkspaceID, client) if err != nil { setupLog.Error(err, "unable to create SaaS client", "workspaceID", saasWorkspaceID) os.Exit(1)