Merge pull request #8096 from ryantxu/influx-db-query2

let the influxdb API set a database
This commit is contained in:
Daniel Lee
2018-04-13 18:22:12 +02:00
committed by GitHub
3 changed files with 39 additions and 31 deletions

View File

@@ -189,12 +189,6 @@ func (proxy *DataSourceProxy) getDirector() func(req *http.Request) {
}
func (proxy *DataSourceProxy) validateRequest() error {
if proxy.ds.Type == m.DS_INFLUXDB {
if proxy.ctx.Query("db") != proxy.ds.Database {
return errors.New("Datasource is not configured to allow this database")
}
}
if !checkWhiteList(proxy.ctx, proxy.targetUrl.Host) {
return errors.New("Target url is not a valid target")
}