From 3a4f218ff6bc4e16ee48381f46b8a18adeab893b Mon Sep 17 00:00:00 2001 From: bboysoul <31786046+bboysoulcn@users.noreply.github.com> Date: Tue, 29 Jun 2021 13:33:53 +0800 Subject: [PATCH] Update https.go --- server/proxy/https.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/proxy/https.go b/server/proxy/https.go index b13421b..d6fb5d0 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -192,6 +192,7 @@ func buildMyHttpsRequest(hostName string, c net.Conn) *http.Request { r.URL.Scheme = "https" r.Host = hostName r.Header = make(http.Header) + var addr string addr = c.RemoteAddr().String() addr = strings.Split(addr, ":")[0] r.Header.Set("X-Forwarded-For", addr)