mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 02:11:09 +00:00
Merge pull request #115670 from tallclair/httpprobe
Document risk of HTTP response body in probe failure msg
This commit is contained in:
commit
125e38c087
@ -117,7 +117,9 @@ func DoHTTPProbe(req *http.Request, client GetHTTPInterface) (probe.Result, stri
|
||||
return probe.Success, body, nil
|
||||
}
|
||||
klog.V(4).Infof("Probe failed for %s with request headers %v, response body: %v", url.String(), headers, body)
|
||||
return probe.Failure, fmt.Sprintf("HTTP probe failed with statuscode: %d", res.StatusCode), nil
|
||||
// Note: Until https://issue.k8s.io/99425 is addressed, this user-facing failure message must not contain the response body.
|
||||
failureMsg := fmt.Sprintf("HTTP probe failed with statuscode: %d", res.StatusCode)
|
||||
return probe.Failure, failureMsg, nil
|
||||
}
|
||||
|
||||
// RedirectChecker returns a function that can be used to check HTTP redirects.
|
||||
|
Loading…
Reference in New Issue
Block a user