code: func NewReverseProxy(target *url.URL) *ReverseProxy {
  	targetQuery := target.RawQuery
  	director := func(req *http.Request) {
  		req.URL.Scheme = target.Scheme
  		req.URL.Host = target.Host
  		req.URL.Path = singleJoiningSlash(target.Path, req.URL.Path)
  
  		// If Host is empty, the Request.Write method uses
  		// the value of URL.Host.
  		// force use URL.Host
  		req.Host = req.URL.Host
  		if targetQuery == "" || req.URL.RawQuery == "" {
  			req.URL.RawQuery = targetQuery + req.URL.RawQuery
  		} else {
  			req.URL.RawQuery = targetQuery + "&" + req.URL.RawQuery
  		}
  
  		if _, ok := req.Header["User-Agent"]; !ok {
  			req.Header.Set("User-Agent", "")
  		}
  	}
  
  	return &ReverseProxy{Director: director}
  }
docs: // NewReverseProxy returns a new ReverseProxy that routes
  // URLs to the scheme, host, and base path provided in target. If the
  // target's path is "/base" and the incoming request was for "/dir",
  // the target request will be for /base/dir. if the target's query is a=10
  // and the incoming request's query is b=100, the target's request's query
  // will be a=10&b=100.
  // NewReverseProxy does not rewrite the Host header.
  // To rewrite Host headers, use ReverseProxy directly with a custom
  // Director policy.