fix proxy bug (#2070)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user