Use the Host header from the original Kapacitor URL

pull/1223/head
John Gilden 2017-04-07 10:02:19 +02:00 committed by Chris Goller
parent 94d1cb007d
commit f050b5adc6
1 changed files with 3 additions and 0 deletions

View File

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