mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 14:45:28 +00:00
Add some XSRF protection to kubectl proxy.
This commit is contained in:
@@ -40,9 +40,14 @@ $ kubectl proxy --api-prefix=/k8s-api
|
||||
### Options
|
||||
|
||||
```
|
||||
--accept-hosts="^localhost$,^127\\.0\\.0\\.1$,^\\[::1\\]$": Regular expression for hosts that the proxy should accept.
|
||||
--accept-paths="^/api/.*": Regular expression for paths that the proxy should accept.
|
||||
--api-prefix="/api/": Prefix to serve the proxied API under.
|
||||
--disable-filter=false: If true, disable request filtering in the proxy. This is dangerous, and can leave you vulnerable to XSRF attacks. Use with caution.
|
||||
-h, --help=false: help for proxy
|
||||
-p, --port=8001: The port on which to run the proxy.
|
||||
--reject-methods="POST,PUT,PATCH": Regular expression for HTTP methods that the proxy should reject.
|
||||
--reject-paths="^/api/.*/exec,^/api/.*/run": Regular expression for paths that the proxy should reject.
|
||||
-w, --www="": Also serve static files from the given directory under the specified prefix.
|
||||
-P, --www-prefix="/static/": Prefix to serve static files under, if static file directory is specified.
|
||||
```
|
||||
@@ -79,6 +84,6 @@ $ kubectl proxy --api-prefix=/k8s-api
|
||||
### SEE ALSO
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra at 2015-06-05 21:08:36.513099878 +0000 UTC
|
||||
###### Auto generated by spf13/cobra at 2015-06-11 03:49:29.837564354 +0000 UTC
|
||||
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user