mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
http: fixed a bug in reqHeader.Get
This commit is contained in:
parent
21935fc6b9
commit
045531d68d
2
http.go
2
http.go
@ -103,7 +103,7 @@ func (s *HTTP) Serve(c net.Conn) {
|
|||||||
|
|
||||||
// X-Forwarded-For
|
// X-Forwarded-For
|
||||||
if s.xff {
|
if s.xff {
|
||||||
if reqHeader.Get("") != "" {
|
if reqHeader.Get("X-Forwarded-For") != "" {
|
||||||
reqHeader.Add("X-Forwarded-For", ",")
|
reqHeader.Add("X-Forwarded-For", ",")
|
||||||
}
|
}
|
||||||
reqHeader.Add("X-Forwarded-For", c.RemoteAddr().(*net.TCPAddr).IP.String())
|
reqHeader.Add("X-Forwarded-For", c.RemoteAddr().(*net.TCPAddr).IP.String())
|
||||||
|
Loading…
Reference in New Issue
Block a user