diff --git a/rpc_server/routers/method_map.go b/rpc_server/routers/method_map.go index 1a9b78cf..0a89d780 100644 --- a/rpc_server/routers/method_map.go +++ b/rpc_server/routers/method_map.go @@ -5,10 +5,12 @@ import "github.com/gin-gonic/gin" type RestfulMethod string const ( - PUT RestfulMethod = "PUT" - GET RestfulMethod = "GET" - DELETE RestfulMethod = "DELETE" - POST RestfulMethod = "POST" + PUT RestfulMethod = "PUT" + GET RestfulMethod = "GET" + DELETE RestfulMethod = "DELETE" + POST RestfulMethod = "POST" + HEAD RestfulMethod = "HEAD" + OPTIONS RestfulMethod = "OPTIONS" ) type RouterMap struct { diff --git a/rpc_server/routers/routers_map.go b/rpc_server/routers/routers_map.go index 08d02905..ec90f12b 100644 --- a/rpc_server/routers/routers_map.go +++ b/rpc_server/routers/routers_map.go @@ -15,7 +15,7 @@ func init() { PrivateRouterMaps = append(PrivateRouterMaps, RouterMap{string(GetSupportStrategy), []RestfulMethod{GET}, v1.GetSupportStrategy}) PrivateRouterMaps = append(PrivateRouterMaps, RouterMap{string(GetSupportEntrypoint), []RestfulMethod{GET}, v1.GetSupportEntrypoint}) PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Auth), []RestfulMethod{POST}, api.Auth}) - PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Healthz), []RestfulMethod{GET, POST, PUT, DELETE}, api.Healthz}) + PublicRouterMaps = append(PublicRouterMaps, RouterMap{string(Healthz), []RestfulMethod{GET, HEAD, OPTIONS}, api.Healthz}) } type Path string