From 25b9028777bcf7bf993de43bc76fe854c08a794c Mon Sep 17 00:00:00 2001 From: zbenamram <55831041+zbenamram@users.noreply.github.com> Date: Wed, 14 Aug 2024 17:42:14 -0700 Subject: [PATCH] removing headers to set. removing unneed changes (#5) --- proxy/handler.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/proxy/handler.go b/proxy/handler.go index 15c447d..f6e26e9 100644 --- a/proxy/handler.go +++ b/proxy/handler.go @@ -49,9 +49,6 @@ func (p *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { director := func(req *http.Request) { req.URL.Scheme = targetURL.Scheme req.URL.Host = targetURL.Host - req.URL.Path = r.URL.Path - req.URL.RawQuery = r.URL.RawQuery - req.Header = r.Header req.Host = targetURL.Host req.Header.Del(SupergoodClientIDHeader) @@ -62,6 +59,7 @@ func (p *ProxyHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } for _, cred := range vendorConfig.Credentials { + req.Header.Del(cred.Key) req.Header.Add(cred.Key, cred.Value) } }