diff --git a/act/artifactcache/mac.go b/act/artifactcache/mac.go index d41a76cf..1b129b77 100644 --- a/act/artifactcache/mac.go +++ b/act/artifactcache/mac.go @@ -45,7 +45,9 @@ func validateAge(ts string) bool { func computeMac(secret, repo, run, ts string) string { mac := hmac.New(sha256.New, []byte(secret)) mac.Write([]byte(repo)) + mac.Write([]byte(">")) mac.Write([]byte(run)) + mac.Write([]byte(">")) mac.Write([]byte(ts)) return hex.EncodeToString(mac.Sum(nil)) } diff --git a/act/cacheproxy/handler.go b/act/cacheproxy/handler.go index 293b2bc7..13997ef2 100644 --- a/act/cacheproxy/handler.go +++ b/act/cacheproxy/handler.go @@ -166,7 +166,7 @@ func (h *Handler) newReverseProxy(targetHost string) (*httputil.ReverseProxy, er func (h *Handler) ExternalURL() string { // TODO: make the external url configurable if necessary - return net.JoinHostPort(h.outboundIP, strconv.Itoa(h.listener.Addr().(*net.TCPAddr).Port)) + return fmt.Sprintf("http://%s", net.JoinHostPort(h.outboundIP, strconv.Itoa(h.listener.Addr().(*net.TCPAddr).Port))) } // Informs the proxy of a workflow run that can make cache requests.