diff options
author | Jhon Honce <jhonce@redhat.com> | 2020-07-30 08:16:14 -0700 |
---|---|---|
committer | Valentin Rothberg <rothberg@redhat.com> | 2020-08-11 13:53:23 +0200 |
commit | 1752851958145f65e50cef5fab3e114487fcb63a (patch) | |
tree | e3609ced345f34cb4683dd7ef98cf18b82354a73 /pkg | |
parent | d0b6e258bfcd2c15d8954aeae38e630b49c8f803 (diff) | |
download | podman-1752851958145f65e50cef5fab3e114487fcb63a.tar.gz podman-1752851958145f65e50cef5fab3e114487fcb63a.tar.bz2 podman-1752851958145f65e50cef5fab3e114487fcb63a.zip |
Add versioned _ping endpoint
Fixes #7008
Signed-off-by: Jhon Honce <jhonce@redhat.com>
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 70e88ee00..d4ae78e74 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 } |