From 3c645e96928f386de5444850f2119d73aa8f9afc Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Tue, 21 Nov 2023 15:05:47 -0800 Subject: [PATCH] also log x-forwarded-host which go's reverse proxy sets --- http_logging.go | 1 + 1 file changed, 1 insertion(+) diff --git a/http_logging.go b/http_logging.go index 36b99ad..41d679b 100644 --- a/http_logging.go +++ b/http_logging.go @@ -69,6 +69,7 @@ func LogRequest(r *http.Request, msg string, extraAttributes ...KeyVal) { Str("remote_addr", r.RemoteAddr), Str("host", r.Host), Str("header.x-forwarded-proto", r.Header.Get("X-Forwarded-Proto")), Str("header.x-forwarded-for", r.Header.Get("X-Forwarded-For")), + Str("header.x-forwarded-host", r.Header.Get("X-Forwarded-Host")), Str("user-agent", r.Header.Get("User-Agent")), } attr = AppendTLSInfoAttrs(attr, r)