From f050b5adc65dc3fe18fe862c4c064883259f2fc9 Mon Sep 17 00:00:00 2001 From: John Gilden Date: Fri, 7 Apr 2017 10:02:19 +0200 Subject: [PATCH] Use the Host header from the original Kapacitor URL --- server/proxy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/proxy.go b/server/proxy.go index 5e1a0fa85..b00709e07 100644 --- a/server/proxy.go +++ b/server/proxy.go @@ -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