Skip to content

Commit

Permalink
fix(logaget): correct proxy target url
Browse files Browse the repository at this point in the history
  • Loading branch information
leonarliu committed Apr 12, 2022
1 parent b75278e commit 53baca5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/logagent/util/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ func APIServerLocationByCluster(ctx context.Context, clusterName string, platfor
if credential.Token != nil {
token = *credential.Token
}
return &url.URL{
Scheme: "https",
Host: restConfig.Host,
Path: requestInfo.Path,
}, transport, token, nil
apiserver, err := url.Parse(restConfig.Host)
if err != nil {
return nil, nil, "", err
}
apiserver.Path = requestInfo.Path
return apiserver, transport, token, nil
}

//use cache to optimize this function
Expand Down

0 comments on commit 53baca5

Please sign in to comment.