From 680d988d424597ef1433a8e403075bce45efd95f Mon Sep 17 00:00:00 2001 From: Umputun Date: Tue, 1 Jun 2021 04:00:38 -0500 Subject: [PATCH] change url value in final proxy to const usage --- app/proxy/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/proxy/proxy.go b/app/proxy/proxy.go index 2dd729c..17f057e 100644 --- a/app/proxy/proxy.go +++ b/app/proxy/proxy.go @@ -187,7 +187,7 @@ func (h *Http) proxyHandler() http.HandlerFunc { reverseProxy := &httputil.ReverseProxy{ Director: func(r *http.Request) { ctx := r.Context() - uu := ctx.Value(contextKey("url")).(*url.URL) + uu := ctx.Value(ctxURL).(*url.URL) r.Header.Add("X-Forwarded-Host", r.Host) r.URL.Path = uu.Path r.URL.Host = uu.Host