From ea6b44a78ca0dcdc0423c84dc55a75fe883d1a87 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 10 Mar 2017 15:45:27 -0500 Subject: [PATCH] httplog: off by one ... Signed-off-by: Vincent Batts --- httplog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httplog.go b/httplog.go index 795fe10..e44d141 100644 --- a/httplog.go +++ b/httplog.go @@ -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) {