From 4732479d324e7b29c3589a0e898e403cbc98bf33 Mon Sep 17 00:00:00 2001 From: Bai Long Date: Mon, 16 Dec 2024 14:22:40 +0800 Subject: [PATCH] recover query cleaned by proxy --- pkg/util/vhost/http.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/util/vhost/http.go b/pkg/util/vhost/http.go index bc458a5c48..2cf0237b4a 100644 --- a/pkg/util/vhost/http.go +++ b/pkg/util/vhost/http.go @@ -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 != "" {