Replace custom proxy with httputil.ReverseProxy for kubecfg/kubectl.

Fixes #1149 - kubecfg proxy "411 Length Required" error on POST/PUT.
This commit is contained in:
alex
2014-10-21 18:52:18 +01:00
parent d5377e4a39
commit fb2b15a797
8 changed files with 254 additions and 128 deletions

View File

@@ -260,7 +260,10 @@ func main() {
open.Start("http://localhost:8001/static/")
}()
}
server := kubecfg.NewProxyServer(*www, kubeClient)
server, err := kubecfg.NewProxyServer(*www, clientConfig)
if err != nil {
glog.Fatalf("Error creating proxy server: %v", err)
}
glog.Fatal(server.Serve())
}