security: restrict anonymous access to the /kapis/version endpoint (#2107)
Signed-off-by: hongming <coder.scala@gmail.com>
This commit is contained in:
@@ -459,7 +459,7 @@ func (r *Reconciler) tryFetchKubeSphereVersion(ctx context.Context, cluster *clu
|
||||
port = "443"
|
||||
}
|
||||
response, err := clusterClient.KubernetesClient.CoreV1().Services(constants.KubeSphereNamespace).
|
||||
ProxyGet(scheme, constants.KubeSphereAPIServerName, port, "/kapis/version", nil).
|
||||
ProxyGet(scheme, constants.KubeSphereAPIServerName, port, "/version", nil).
|
||||
DoRaw(ctx)
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user