diff --git a/pkg/api/gnetproxy.go b/pkg/api/gnetproxy.go index 344cd3fe926..8425f0e41b7 100644 --- a/pkg/api/gnetproxy.go +++ b/pkg/api/gnetproxy.go @@ -5,8 +5,10 @@ import ( "net" "net/http" "net/http/httputil" + "net/url" "time" + "github.com/Unknwon/log" "github.com/grafana/grafana/pkg/middleware" "github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/util" @@ -23,12 +25,15 @@ var gNetProxyTransport = &http.Transport{ } func ReverseProxyGnetReq(proxyPath string) *httputil.ReverseProxy { - director := func(req *http.Request) { - req.URL.Scheme = "https" - req.URL.Host = "grafana.net" - req.Host = "grafana.net" + url, _ := url.Parse(setting.GrafanaNetUrl) - req.URL.Path = util.JoinUrlFragments(setting.GrafanaNetUrl+"/api", proxyPath) + director := func(req *http.Request) { + req.URL.Scheme = url.Scheme + req.URL.Host = url.Host + req.Host = url.Host + + req.URL.Path = util.JoinUrlFragments(url.Path+"/api", proxyPath) + log.Info("Url: %v", req.URL.Path) // clear cookie headers req.Header.Del("Cookie") diff --git a/public/app/features/dashboard/all.js b/public/app/features/dashboard/all.js index 15c765f2281..6aea2efa9f1 100644 --- a/public/app/features/dashboard/all.js +++ b/public/app/features/dashboard/all.js @@ -17,7 +17,7 @@ define([ './importCtrl', './impression_store', './upload', - './import/import', + './import/dash_import', './export/export_modal', './dash_list_ctrl', ], function () {}); diff --git a/public/app/features/dashboard/export/export_modal.html b/public/app/features/dashboard/export/export_modal.html index 7241a210bf5..e890e405020 100644 --- a/public/app/features/dashboard/export/export_modal.html +++ b/public/app/features/dashboard/export/export_modal.html @@ -15,16 +15,6 @@ You can share dashboards on Grafana.net
-