Skip to content

Commit

Permalink
Check for proxy command != nil and len > 0
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Graetz <[email protected]>
  • Loading branch information
fg91 committed Oct 13, 2023
1 parent 25c2258 commit 196b71b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flyteidl/clients/go/admin/auth_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func setHTTPClientContext(ctx context.Context, cfg *Config, proxyCredentialsFutu
transport.Proxy = http.ProxyURL(&cfg.HTTPProxyURL.URL)
}

if len(cfg.ProxyCommand) > 0 {
if cfg.ProxyCommand != nil && len(cfg.ProxyCommand) > 0 {
httpClient.Transport = &proxyAuthTransport{
transport: transport,
proxyCredentialsFuture: proxyCredentialsFuture,
Expand Down
2 changes: 1 addition & 1 deletion flyteidl/clients/go/admin/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func NewAdminConnection(ctx context.Context, cfg *Config, proxyCredentialsFuture

opts = append(opts, GetAdditionalAdminClientConfigOptions(cfg)...)

if len(cfg.ProxyCommand) > 0 {
if cfg.ProxyCommand != nil && len(cfg.ProxyCommand) > 0 {
opts = append(opts, grpc.WithChainUnaryInterceptor(NewProxyAuthInterceptor(cfg, proxyCredentialsFuture)))
opts = append(opts, grpc.WithPerRPCCredentials(proxyCredentialsFuture))
}
Expand Down

0 comments on commit 196b71b

Please sign in to comment.