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:
parent
56cd1205a1
commit
680d988d42
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user