mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-26 22:53:47 +03:00
set X-Forwarded-Host to orid host, drop X-Origin-Host #67
This commit is contained in:
parent
a73a16c12b
commit
25ee73d8d6
@ -171,8 +171,7 @@ func (h *Http) proxyHandler() http.HandlerFunc {
|
|||||||
Director: func(r *http.Request) {
|
Director: func(r *http.Request) {
|
||||||
ctx := r.Context()
|
ctx := r.Context()
|
||||||
uu := ctx.Value(contextKey("url")).(*url.URL)
|
uu := ctx.Value(contextKey("url")).(*url.URL)
|
||||||
r.Header.Add("X-Forwarded-Host", uu.Host)
|
r.Header.Add("X-Forwarded-Host", r.Host)
|
||||||
r.Header.Set("X-Origin-Host", r.Host)
|
|
||||||
r.URL.Path = uu.Path
|
r.URL.Path = uu.Path
|
||||||
r.URL.Host = uu.Host
|
r.URL.Host = uu.Host
|
||||||
r.URL.Scheme = uu.Scheme
|
r.URL.Scheme = uu.Scheme
|
||||||
|
Loading…
Reference in New Issue
Block a user