diff options
author | 2018-09-09 15:15:14 -0700 | |
---|---|---|
committer | 2018-09-09 15:15:14 -0700 | |
commit | c9f9dd3262b9f8437981f92fac100e508e3c3bcd (patch) | |
tree | 16a08ddab87276c6cad972311aa2cfb78843557e /middleware/logging.go | |
parent | c1e1506720e3c8b4e8782da9ff73ce1c57ce71a5 (diff) | |
download | v2-c9f9dd3262b9f8437981f92fac100e508e3c3bcd.tar.gz v2-c9f9dd3262b9f8437981f92fac100e508e3c3bcd.tar.zst v2-c9f9dd3262b9f8437981f92fac100e508e3c3bcd.zip |
Store client IP address in request context
Diffstat (limited to 'middleware/logging.go')
-rw-r--r-- | middleware/logging.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/middleware/logging.go b/middleware/logging.go index 2e78ea8e..fdf1ce3f 100644 --- a/middleware/logging.go +++ b/middleware/logging.go @@ -14,7 +14,7 @@ import ( // Logging logs the HTTP request. func (m *Middleware) Logging(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - logger.Debug("[HTTP] %s %s %s", request.RealIP(r), r.Method, r.RequestURI) + logger.Debug("[HTTP] %s %s %s", request.ClientIP(r), r.Method, r.RequestURI) next.ServeHTTP(w, r) }) } |