1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-17 15:40:07 +00:00

Merge pull request #2520 from pmorillon/unset_proxy_env_vars_when_using_bastion

Unset proxy env vars when using bastion
This commit is contained in:
Sebastiaan van Steenis
2021-06-07 14:55:43 +02:00
committed by GitHub
3 changed files with 11 additions and 2 deletions

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"net"
"os"
"reflect"
"strings"
"time"
@@ -779,6 +780,12 @@ func (c *Cluster) SetupDialers(ctx context.Context, dailersOptions hosts.Dialers
if err != nil {
return err
}
if c.BastionHost.IgnoreProxyEnvVars {
logrus.Debug("Unset http proxy environment variables")
for _, v := range util.ProxyEnvVars {
os.Unsetenv(v)
}
}
}
return nil
}