Update https.go

pull/825/head
bboysoul 2021-06-29 13:33:53 +08:00 committed by GitHub
parent f2e108f8e7
commit 3a4f218ff6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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)