mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Update the proxy server.
This commit is contained in:
parent
1ddc012b17
commit
14838df51e
@ -130,6 +130,12 @@ func main() {
|
||||
}
|
||||
method := flag.Arg(0)
|
||||
|
||||
if len(flag.Args()) < 1 {
|
||||
usage()
|
||||
os.Exit(1)
|
||||
}
|
||||
method := flag.Arg(0)
|
||||
|
||||
matchFound := executeAPIRequest(method, auth) || executeControllerRequest(method, auth)
|
||||
if matchFound == false {
|
||||
glog.Fatalf("Unknown command %s", method)
|
||||
|
@ -234,3 +234,4 @@ func (r Result) Into(obj interface{}) error {
|
||||
func (r Result) Error() error {
|
||||
return r.err
|
||||
}
|
||||
|
||||
|
@ -71,5 +71,7 @@ func (s *ProxyServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
s.doError(w, err)
|
||||
return
|
||||
}
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Header().Add("Content-type", "application/json")
|
||||
w.Write(data)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user