Skip to content

Commit

Permalink
Don't set user-agent to Go-http-client/1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dsseng authored and traefiker committed Dec 18, 2019
1 parent 8930236 commit 4f669bd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/server/service/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ func buildProxy(passHostHeader *bool, responseForwarding *dynamic.ResponseForwar
outReq.ProtoMajor = 1
outReq.ProtoMinor = 1

if _, ok := outReq.Header["User-Agent"]; !ok {
outReq.Header.Set("User-Agent", "")
}

// Do not pass client Host header unless optsetter PassHostHeader is set.
if passHostHeader != nil && !*passHostHeader {
outReq.Host = outReq.URL.Host
Expand Down

0 comments on commit 4f669bd

Please sign in to comment.