Skip to content

Commit 73713b3

Browse files
committed
bugfix
1 parent 69b7225 commit 73713b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

proxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ func (p *proxy) ServeHTTP(w http.ResponseWriter, r *http.Request) {
8484
// explicitly disable User-Agent so it's not set to default value
8585
req.Header.Set("User-Agent", "")
8686
}
87+
req.Host = target.Host
88+
req.Header.Set("X-Real-Ip", req.RemoteAddr)
8789
}
8890
proxy := &httputil.ReverseProxy{Director: director}
8991
proxy.ServeHTTP(w, r)

0 commit comments

Comments
 (0)