From 54df095109c99c3104859bd70aa5b9350ea00839 Mon Sep 17 00:00:00 2001 From: bboysoul <31786046+bboysoulcn@users.noreply.github.com> Date: Tue, 29 Jun 2021 12:52:05 +0800 Subject: [PATCH] Update https.go --- server/proxy/https.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/proxy/https.go b/server/proxy/https.go index ef25f0b..fe82a7d 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -192,8 +192,8 @@ func buildMyHttpsRequest(hostName string, c net.Conn) *http.Request { r.URL.Scheme = "https" r.Host = hostName logs.Trace("start add header") - r.Header.Set("X-Forwarded-For", "1.1.1.1") - r.Header.Set("X-Real-IP", "1.1.1.1") + r.Header.Set("X-Forwarded-For", c.RemoteAddr().String()) + r.Header.Set("X-Real-IP", c.RemoteAddr().String()) return r }