fix golint issues in core/threading (#524)
This commit is contained in:
@@ -2,11 +2,11 @@ package httpx
|
||||
|
||||
import "net/http"
|
||||
|
||||
const xForwardFor = "X-Forwarded-For"
|
||||
const xForwardedFor = "X-Forwarded-For"
|
||||
|
||||
// GetRemoteAddr returns the peer address, supports X-Forward-For.
|
||||
func GetRemoteAddr(r *http.Request) string {
|
||||
v := r.Header.Get(xForwardFor)
|
||||
v := r.Header.Get(xForwardedFor)
|
||||
if len(v) > 0 {
|
||||
return v
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user