From ea21c12b7ee6906e2d1277c8d40d7877a069b3e4 Mon Sep 17 00:00:00 2001 From: hweawer Date: Thu, 16 Jan 2025 13:39:14 +0100 Subject: [PATCH] Https in paths --- agent/agentclient/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/agentclient/client.go b/agent/agentclient/client.go index beaa4b0f..81b65997 100644 --- a/agent/agentclient/client.go +++ b/agent/agentclient/client.go @@ -48,7 +48,7 @@ func New(addr string) *HTTPClient { // GetTag resolves tag into a digest. Returns ErrTagNotFound if the tag does // not exist. func (c *HTTPClient) GetTag(tag string) (core.Digest, error) { - resp, err := httputil.Get(fmt.Sprintf("http://%s/tags/%s", c.addr, url.PathEscape(tag))) + resp, err := httputil.Get(fmt.Sprintf("https://%s/tags/%s", c.addr, url.PathEscape(tag))) if err != nil { if httputil.IsNotFound(err) { return core.Digest{}, ErrTagNotFound @@ -72,7 +72,7 @@ func (c *HTTPClient) GetTag(tag string) (core.Digest, error) { func (c *HTTPClient) Download(namespace string, d core.Digest) (io.ReadCloser, error) { resp, err := httputil.Get( fmt.Sprintf( - "http://%s/namespace/%s/blobs/%s", + "https://%s/namespace/%s/blobs/%s", c.addr, url.PathEscape(namespace), d)) if err != nil { return nil, err