mirror of
https://github.com/umputun/reproxy.git
synced 2024-11-24 08:12:31 +02: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) {
|
||||
ctx := r.Context()
|
||||
uu := ctx.Value(contextKey("url")).(*url.URL)
|
||||
r.Header.Add("X-Forwarded-Host", uu.Host)
|
||||
r.Header.Set("X-Origin-Host", r.Host)
|
||||
r.Header.Add("X-Forwarded-Host", r.Host)
|
||||
r.URL.Path = uu.Path
|
||||
r.URL.Host = uu.Host
|
||||
r.URL.Scheme = uu.Scheme
|
||||
|
Loading…
Reference in New Issue
Block a user