From 4eb5d68fbfa7a51f5983da226f85137c41b81b9c Mon Sep 17 00:00:00 2001 From: mStar Date: Mon, 12 May 2025 15:35:45 +0200 Subject: [PATCH] Fix for the fix I didn't actually write the found ip to the logging stack (or whatever zerolog uses). This is now fixed --- http/zerolog.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http/zerolog.go b/http/zerolog.go index 026ea9b..0249d21 100644 --- a/http/zerolog.go +++ b/http/zerolog.go @@ -91,7 +91,7 @@ func RealIpAppenderMiddleware(fieldKey string) func(handler http.Handler) http.H if IPAddress != "" { log := zerolog.Ctx(r.Context()) log.UpdateContext(func(c zerolog.Context) zerolog.Context { - return c.Str(fieldKey, r.RemoteAddr) + return c.Str(fieldKey, IPAddress) }) } next.ServeHTTP(w, r)