|
@@ -375,6 +375,12 @@ func (p *ReverseProxy) ProxyHTTP(rw http.ResponseWriter, req *http.Request, rrr
|
|
|
// Remove hop-by-hop headers listed in the "Connection" header of the response, Remove hop-by-hop headers.
|
|
|
removeHeaders(res.Header, rrr.NoCache)
|
|
|
|
|
|
+ //Remove the User-Agent header if exists
|
|
|
+ if _, ok := res.Header["User-Agent"]; ok {
|
|
|
+ //Server to client request should not contains a User-Agent header
|
|
|
+ res.Header.Del("User-Agent")
|
|
|
+ }
|
|
|
+
|
|
|
if p.ModifyResponse != nil {
|
|
|
if err := p.ModifyResponse(res); err != nil {
|
|
|
if p.Verbal {
|