CloudWatch proxy support

This commit is contained in:
Mitsuhiro Tanda
2015-08-13 21:20:47 +09:00
parent 1c6b7203cc
commit 00f76ecaf6
5 changed files with 165 additions and 12 deletions

View File

@ -67,8 +67,12 @@ func ProxyDataSourceRequest(c *middleware.Context) {
return
}
proxyPath := c.Params("*")
proxy := NewReverseProxy(&query.Result, proxyPath)
proxy.Transport = dataProxyTransport
proxy.ServeHTTP(c.RW(), c.Req.Request)
if query.Result.Type == m.DS_CLOUDWATCH {
ProxyCloudWatchDataSourceRequest(c)
} else {
proxyPath := c.Params("*")
proxy := NewReverseProxy(&query.Result, proxyPath)
proxy.Transport = dataProxyTransport
proxy.ServeHTTP(c.RW(), c.Req.Request)
}
}