mirror of
https://github.com/kemko/reproxy.git
synced 2026-01-01 15:55:49 +03:00
change url value in final proxy to const usage
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user