Skip to content

Commit

Permalink
eventshub forwarder, don't clone Host header (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmid authored Mar 19, 2024
1 parent 234a760 commit 56cee28
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 56cee28

Please sign in to comment.