Skip to content

Commit

Permalink
eventshub forwarder, don't clone Host header
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmid committed Mar 18, 2024
1 parent fd5aa45 commit 52aa1a7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/eventshub/forwarder/forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 52aa1a7

Please sign in to comment.