From 03a9650c575cb641f4923007f0348aa6a0142d0f Mon Sep 17 00:00:00 2001 From: bergquist Date: Fri, 20 Apr 2018 09:52:25 +0200 Subject: [PATCH] cli: adds os and arch headers this makes it possible for the plugin repo to provide the correct package if arch and os matters --- pkg/cmd/grafana-cli/services/services.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/cmd/grafana-cli/services/services.go b/pkg/cmd/grafana-cli/services/services.go index 3745dbff90e..e743d42022c 100644 --- a/pkg/cmd/grafana-cli/services/services.go +++ b/pkg/cmd/grafana-cli/services/services.go @@ -10,6 +10,7 @@ import ( "net/http" "net/url" "path" + "runtime" "time" "github.com/grafana/grafana/pkg/cmd/grafana-cli/logger" @@ -155,6 +156,8 @@ func sendRequest(repoUrl string, subPaths ...string) ([]byte, error) { req, err := http.NewRequest(http.MethodGet, u.String(), nil) req.Header.Set("grafana-version", grafanaVersion) + req.Header.Set("grafana-os", runtime.GOOS) + req.Header.Set("grafana-arch", runtime.GOARCH) req.Header.Set("User-Agent", "grafana "+grafanaVersion) if err != nil {