mirror of https://github.com/ehang-io/nps
Update https.go
parent
f2e108f8e7
commit
3a4f218ff6
|
@ -192,6 +192,7 @@ func buildMyHttpsRequest(hostName string, c net.Conn) *http.Request {
|
||||||
r.URL.Scheme = "https"
|
r.URL.Scheme = "https"
|
||||||
r.Host = hostName
|
r.Host = hostName
|
||||||
r.Header = make(http.Header)
|
r.Header = make(http.Header)
|
||||||
|
var addr string
|
||||||
addr = c.RemoteAddr().String()
|
addr = c.RemoteAddr().String()
|
||||||
addr = strings.Split(addr, ":")[0]
|
addr = strings.Split(addr, ":")[0]
|
||||||
r.Header.Set("X-Forwarded-For", addr)
|
r.Header.Set("X-Forwarded-For", addr)
|
||||||
|
|
Loading…
Reference in New Issue