mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-05-28 04:35:50 -04:00
Add warning into kubectl proxy
Kubernetes-commit: d6a64b80c11b917fa9b349c2d3fbcfcacc995b62
This commit is contained in:
parent
49da2e357b
commit
5f4ecf845f
1 changed files with 3 additions and 0 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Reference in a new issue