From c5e34f777c6695899f2d347615b3a296d84c5f2a Mon Sep 17 00:00:00 2001 From: Mariano Cano Date: Wed, 27 Nov 2019 14:27:23 -0800 Subject: [PATCH] Replace /ssh/get-hosts to /ssh/hosts --- api/api.go | 3 ++- ca/client.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/api.go b/api/api.go index 1fb0230a..0c16168f 100644 --- a/api/api.go +++ b/api/api.go @@ -297,12 +297,13 @@ func (h *caHandler) Route(r Router) { r.MethodFunc("POST", "/ssh/config", h.SSHConfig) r.MethodFunc("POST", "/ssh/config/{type}", h.SSHConfig) r.MethodFunc("POST", "/ssh/check-host", h.SSHCheckHost) - r.MethodFunc("GET", "/ssh/get-hosts", h.SSHGetHosts) + r.MethodFunc("GET", "/ssh/hosts", h.SSHGetHosts) r.MethodFunc("POST", "/ssh/bastion", h.SSHBastion) // For compatibility with old code: r.MethodFunc("POST", "/re-sign", h.Renew) r.MethodFunc("POST", "/sign-ssh", h.SSHSign) + r.MethodFunc("GET", "/ssh/get-hosts", h.SSHGetHosts) } // Version is an HTTP handler that returns the version of the server. diff --git a/ca/client.go b/ca/client.go index 21b52025..2a8e9ca8 100644 --- a/ca/client.go +++ b/ca/client.go @@ -929,7 +929,7 @@ retry: // SSHGetHosts performs the GET /ssh/get-hosts request to the CA. func (c *Client) SSHGetHosts() (*api.SSHGetHostsResponse, error) { var retried bool - u := c.endpoint.ResolveReference(&url.URL{Path: "/ssh/get-hosts"}) + u := c.endpoint.ResolveReference(&url.URL{Path: "/ssh/hosts"}) retry: resp, err := c.client.Get(u.String()) if err != nil {