From 56cee28dd2e6e1c105bfb6dd57baa4fe8cdd12af Mon Sep 17 00:00:00 2001 From: Marek Schmidt Date: Tue, 19 Mar 2024 09:34:46 +0100 Subject: [PATCH] eventshub forwarder, don't clone Host header (#692) --- pkg/eventshub/forwarder/forwarder.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/eventshub/forwarder/forwarder.go b/pkg/eventshub/forwarder/forwarder.go index 8d755187..e0d2e833 100644 --- a/pkg/eventshub/forwarder/forwarder.go +++ b/pkg/eventshub/forwarder/forwarder.go @@ -165,6 +165,8 @@ func (o *Forwarder) ServeHTTP(writer http.ResponseWriter, request *http.Request) req := request.Clone(requestCtx) // It is an error to set this field in an HTTP client request. req.RequestURI = "" + // We don't want to use the original request Host header, so drop it from the clone + req.Host = "" u, err := url.Parse(o.Sink) if err != nil {