Add warning into kubectl proxy

Kubernetes-commit: d6a64b80c11b917fa9b349c2d3fbcfcacc995b62
This commit is contained in:
Arda Güçlü 2026-05-15 09:32:33 +03:00 committed by Kubernetes Publisher
parent 49da2e357b
commit 5f4ecf845f

View file

@ -178,6 +178,9 @@ func (o *ProxyOptions) Complete(f cmdutil.Factory) error {
}
o.filter = nil
} else {
if o.rejectPaths == "" || o.rejectMethods == "" {
klog.Warning("Request filter has been relaxed, your proxy may be vulnerable to attacks, please be cautious")
}
o.filter = &proxy.FilterServer{
AcceptPaths: proxy.MakeRegexpArrayOrDie(o.acceptPaths),
RejectPaths: proxy.MakeRegexpArrayOrDie(o.rejectPaths),