recover query cleaned by proxy

This commit is contained in:
Bai Long 2024-12-16 14:22:40 +08:00
parent bb912d6c37
commit 4732479d32

View File

@ -66,7 +66,8 @@ func NewHTTPReverseProxy(option HTTPReverseProxyOptions, vhostRouter *Routers) *
req.URL.Scheme = "http"
reqRouteInfo := req.Context().Value(RouteInfoKey).(*RequestRouteInfo)
originalHost, _ := httppkg.CanonicalHost(reqRouteInfo.Host)
//recover clean by proxy https://cs.opensource.google/go/go/+/refs/tags/go1.23.4:src/net/http/httputil/reverseproxy.go;l=427
req.URL.RawQuery = r.In.URL.RawQuery
rc := req.Context().Value(RouteConfigKey).(*RouteConfig)
if rc != nil {
if rc.RewriteHost != "" {