未验证 提交 1bd660c3 编写于 作者: Z zryfish 提交者: GitHub

fix proxy bug (#2070)

上级 d358d9ab
......@@ -41,6 +41,8 @@ func NewGenericProxy(endpoint string, groupName string, version string) (*generi
}, nil
}
// currently, we only support proxy GET/PUT/POST/DELETE/PATCH.
// Maybe we can try another way to implement proxy.
func (g *genericProxy) AddToContainer(container *restful.Container) error {
webservice := runtime.NewWebService(schema.GroupVersion{
Group: g.GroupName,
......@@ -63,6 +65,10 @@ func (g *genericProxy) AddToContainer(container *restful.Container) error {
To(g.handler).
Returns(http.StatusOK, api.StatusOK, nil))
webservice.Route(webservice.PATCH("/{path:*}").
To(g.handler).
Returns(http.StatusOK, api.StatusOK, nil))
container.Add(webservice)
return nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册