Merge pull request #1223 from influxdata/fix/kapa-vhost

Use the Host header from the original Kapacitor URL
pull/10616/head
Chris Goller 2017-04-07 08:41:40 -05:00 committed by GitHub
commit 3f337d055a
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@
1. [#1095](https://github.com/influxdata/chronograf/pull/1095): Make logout button display again 1. [#1095](https://github.com/influxdata/chronograf/pull/1095): Make logout button display again
1. [#1209](https://github.com/influxdata/chronograf/pull/1209): HipChat Kapacitor config now uses only the subdomain instead of asking for the entire HipChat URL. 1. [#1209](https://github.com/influxdata/chronograf/pull/1209): HipChat Kapacitor config now uses only the subdomain instead of asking for the entire HipChat URL.
1. [#1219](https://github.com/influxdata/chronograf/pull/1219): Update query for default cell in new dashboard 1. [#1219](https://github.com/influxdata/chronograf/pull/1219): Update query for default cell in new dashboard
1. [#1206](https://github.com/influxdata/chronograf/issues/1206): Chronograf now proxies to kapacitors behind proxy using vhost correctly.
### Features ### Features
1. [#1112](https://github.com/influxdata/chronograf/pull/1112): Add ability to delete a dashboard 1. [#1112](https://github.com/influxdata/chronograf/pull/1112): Add ability to delete a dashboard

View File

@ -44,6 +44,9 @@ func (h *Service) KapacitorProxy(w http.ResponseWriter, r *http.Request) {
u.Path = path u.Path = path
director := func(req *http.Request) { director := func(req *http.Request) {
// Set the Host header of the original Kapacitor URL
req.Host = u.Host
req.URL = u req.URL = u
// Because we are acting as a proxy, kapacitor needs to have the basic auth information set as // Because we are acting as a proxy, kapacitor needs to have the basic auth information set as
// a header directly // a header directly