diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-01 09:12:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-01 09:12:07 -0400 |
commit | af2a1327d18f8f0eb50ad9b0f99a64f917ab730e (patch) | |
tree | ffab4872501129f41f015f9e5c40cec40dd9faae /pkg | |
parent | 0d064a0f29971632a58af3508a6f262d4ab16541 (diff) | |
parent | cff727d488f2951d9c07056fb40d642d39c18f42 (diff) | |
download | podman-af2a1327d18f8f0eb50ad9b0f99a64f917ab730e.tar.gz podman-af2a1327d18f8f0eb50ad9b0f99a64f917ab730e.tar.bz2 podman-af2a1327d18f8f0eb50ad9b0f99a64f917ab730e.zip |
Merge pull request #7165 from jwhonce/issues/7008
Add versioned _ping endpoint
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/server/register_ping.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go index 4a8d2c768..4e299008c 100644 --- a/pkg/api/server/register_ping.go +++ b/pkg/api/server/register_ping.go @@ -9,9 +9,8 @@ import ( func (s *APIServer) registerPingHandlers(r *mux.Router) error { - r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet) - r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodHead) - + r.Handle("/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) + r.Handle(VersionedPath("/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) // swagger:operation GET /libpod/_ping libpod libpodPingGet // --- // summary: Ping service @@ -62,7 +61,7 @@ func (s *APIServer) registerPingHandlers(r *mux.Router) error { // determine if talking to Podman engine or another engine // 500: // $ref: "#/responses/InternalError" - r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet) - r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodHead) + r.Handle("/libpod/_ping", s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) + r.Handle(VersionedPath("/libpod/_ping"), s.APIHandler(compat.Ping)).Methods(http.MethodGet, http.MethodHead) return nil } |