1
0
mirror of https://github.com/umputun/reproxy.git synced 2024-11-24 08:12:31 +02:00

change url value in final proxy to const usage

This commit is contained in:
Umputun 2021-06-01 04:00:38 -05:00
parent 56cd1205a1
commit 680d988d42

View File

@ -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