Don't set user-agent to Go-http-client/1.1
This commit is contained in:
parent
8930236396
commit
4f669bdd66
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue