ReverseProxy: use Rewrite to replace Director (#4005)

* display go version in make

* ReverseProxy: use Rewrite to replace Director
This commit is contained in:
fatedier authored and GitHub committed 2024-02-19 21:04:29 +08:00
1 parent 4957fd23ee
commit 518ca2ceb2
5 files changed
+10 -5

No files matched your search

+2 -1
View File
@@ -55,7 +55,8 @@ func NewHTTPS2HTTPSPlugin(options v1.ClientPluginOptions) (Plugin, error) {
}
rp := &httputil.ReverseProxy{
Director: func(req *http.Request) {
Rewrite: func(r *httputil.ProxyRequest) {
req := r.Out
req.URL.Scheme = "https"
req.URL.Host = p.opts.LocalAddr
if p.opts.HostHeaderRewrite != "" {