What's the correct way to get all client's IP Addresses from http.Request
? In PHP
there are a lot of variables that I should check. Is it the same on Go?
One that I found is:
req.RemoteAddr
And is the request case sensitive? for example x-forwarded-for
is the same as X-Forwarded-For
and X-FORWARDED-FOR
? (from req.Header.Get("X-FORWARDED-FOR")
)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…