From 35abfdfd144acd6a42686e9a5b2cc4d117f31377 Mon Sep 17 00:00:00 2001 From: bboysoul <31786046+bboysoulcn@users.noreply.github.com> Date: Tue, 29 Jun 2021 13:17:23 +0800 Subject: [PATCH] Update https.go --- server/proxy/https.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/proxy/https.go b/server/proxy/https.go index fe82a7d..dde1c2d 100644 --- a/server/proxy/https.go +++ b/server/proxy/https.go @@ -191,6 +191,8 @@ func buildMyHttpsRequest(hostName string, c net.Conn) *http.Request { r.URL = new(url.URL) r.URL.Scheme = "https" r.Host = hostName + logs.Trace("start make") + r.Header = make(http.Header) logs.Trace("start add header") r.Header.Set("X-Forwarded-For", c.RemoteAddr().String()) r.Header.Set("X-Real-IP", c.RemoteAddr().String())