Skip to content

Commit

Permalink
Add X-Forwarded-For to default logging (#1670)
Browse files Browse the repository at this point in the history
This allows us to get this info in the logs.
  • Loading branch information
JAORMX authored Nov 16, 2023
1 parent 5bbee88 commit 89a102b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/logger/logging_interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 89a102b

Please sign in to comment.