httplog: off by one ...

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2017-03-10 15:45:27 -05:00
parent becd5526f5
commit ea6b44a78c
Signed by: vbatts
GPG key ID: 10937E57733F1362

View file

@ -65,7 +65,7 @@ func LogRequest(r *http.Request, statusCode int) {
func RealIP(r *http.Request) string {
rip := RealIPs(r)
return rip[len(rip)]
return rip[len(rip)-1]
}
func RealIPs(r *http.Request) (ips []string) {