Fixed hashing of passwords, Closes #3

This commit is contained in:
Torkel Ödegaard
2015-01-08 09:00:00 +01:00
parent 6d814af0cc
commit 3226a3a58e
13 changed files with 138 additions and 60 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import (
"github.com/torkelo/grafana-pro/pkg/bus"
"github.com/torkelo/grafana-pro/pkg/middleware"
m "github.com/torkelo/grafana-pro/pkg/models"
"github.com/torkelo/grafana-pro/pkg/utils"
"github.com/torkelo/grafana-pro/pkg/util"
)
func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy {
@@ -21,12 +21,12 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string) *httputil.ReverseProxy
reqQueryVals := req.URL.Query()
if ds.Type == m.DS_INFLUXDB {
req.URL.Path = utils.JoinUrlFragments(target.Path, "db/"+ds.Database+"/"+proxyPath)
req.URL.Path = util.JoinUrlFragments(target.Path, "db/"+ds.Database+"/"+proxyPath)
reqQueryVals.Add("u", ds.User)
reqQueryVals.Add("p", ds.Password)
req.URL.RawQuery = reqQueryVals.Encode()
} else {
req.URL.Path = utils.JoinUrlFragments(target.Path, proxyPath)
req.URL.Path = util.JoinUrlFragments(target.Path, proxyPath)
}
}