From 89a102b8afd1ccb756ca4bcc891a756f9c6ab079 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Date: Thu, 16 Nov 2023 04:15:13 +0200 Subject: [PATCH] Add `X-Forwarded-For` to default logging (#1670) This allows us to get this info in the logs. --- internal/logger/logging_interceptor.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/logger/logging_interceptor.go b/internal/logger/logging_interceptor.go index aea8ad1324..6339e8c4dc 100644 --- a/internal/logger/logging_interceptor.go +++ b/internal/logger/logging_interceptor.go @@ -43,6 +43,7 @@ func commonAttributes(ctx context.Context, res *status.Status, duration time.Dur "http.user_agent": meta.Get("user-agent"), "http.content-type": meta.Get("content-type"), "http.duration": duration.String(), + "http.forwarded": meta.Get("x-forwarded-for"), }) } return data