Work on data source proxying, #6

This commit is contained in:
Torkel Ödegaard
2014-12-18 20:26:06 +01:00
parent d69258e28f
commit a2a0e0394d
5 changed files with 98 additions and 3 deletions
+5 -1
View File
@@ -25,9 +25,13 @@ func renderConfig(data *configJsTmplModel) string {
datasources := make(map[string]interface{})
for _, ds := range data.DataSources {
url := ds.Url
if ds.Access == m.DS_ACCESS_PROXY {
url = "/api/datasources/proxy/" + ds.Name
}
datasources[ds.Name] = map[string]interface{}{
"type": ds.Type,
"url": ds.Url,
"url": url,
}
}