From 142bde99714e4965bf47e596e4e2133243ab49ed Mon Sep 17 00:00:00 2001 From: Marco Primitivo Date: Mon, 16 Sep 2024 15:52:06 +0200 Subject: [PATCH 1/2] Add Forwarded header among structured log values. --- config/conf.d/001-structured-logs.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/conf.d/001-structured-logs.conf b/config/conf.d/001-structured-logs.conf index 6505cd9..739df9e 100644 --- a/config/conf.d/001-structured-logs.conf +++ b/config/conf.d/001-structured-logs.conf @@ -1 +1 @@ -log_format structured '{"requestId": "$request_id", "status": $status, "request": "$request", "remoteAddr": "$remote_addr", "http_x_forwarded_for": "$http_x_forwarded_for", "proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for", "body_bytes_sent": $body_bytes_sent, "http_referer": "$http_referer", "http_user_agent": "$http_user_agent"}'; +log_format structured '{"requestId": "$request_id", "status": $status, "request": "$request", "remoteAddr": "$remote_addr", "http_x_forwarded_for": "$http_x_forwarded_for", "proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for", "forwarded": "http_forwarded", "body_bytes_sent": $body_bytes_sent, "http_referer": "$http_referer", "http_user_agent": "$http_user_agent"}'; From 0da10cd820557380ee565eb4235c1d8e4768166e Mon Sep 17 00:00:00 2001 From: Marco Primitivo Date: Mon, 16 Sep 2024 15:54:16 +0200 Subject: [PATCH 2/2] Typo fix. --- config/conf.d/001-structured-logs.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/conf.d/001-structured-logs.conf b/config/conf.d/001-structured-logs.conf index 739df9e..9c79183 100644 --- a/config/conf.d/001-structured-logs.conf +++ b/config/conf.d/001-structured-logs.conf @@ -1 +1 @@ -log_format structured '{"requestId": "$request_id", "status": $status, "request": "$request", "remoteAddr": "$remote_addr", "http_x_forwarded_for": "$http_x_forwarded_for", "proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for", "forwarded": "http_forwarded", "body_bytes_sent": $body_bytes_sent, "http_referer": "$http_referer", "http_user_agent": "$http_user_agent"}'; +log_format structured '{"requestId": "$request_id", "status": $status, "request": "$request", "remoteAddr": "$remote_addr", "http_x_forwarded_for": "$http_x_forwarded_for", "proxy_add_x_forwarded_for": "$proxy_add_x_forwarded_for", "forwarded": "$http_forwarded", "body_bytes_sent": $body_bytes_sent, "http_referer": "$http_referer", "http_user_agent": "$http_user_agent"}';