~egtann/srp

86041055ab3737cd884b089809f4c5440c9ec74a — Evan Tann 3 years ago ac438ce
add X-Real-IP header to requests
1 files changed, 1 insertions(+), 0 deletions(-)

M proxy.go
M proxy.go => proxy.go +1 -0
@@ 56,6 56,7 @@ func NewProxy(log Logger, reg Registry) *ReverseProxy {
	director := func(req *http.Request) {
		req.URL.Scheme = "http"
		req.URL.Host = req.Host
		req.Header.Set("X-Real-IP", req.RemoteAddr)
		log.Printf("%s requested %s %s", req.RemoteAddr, req.Method, req.Host)
	}
	transport := newTransport(reg)