From 8c2401c8f1ccb1885f684fc7d5c23fae33334b6c Mon Sep 17 00:00:00 2001 From: Kaleb Saw <49179770+ItsKaleb@users.noreply.github.com> Date: Wed, 23 Aug 2023 12:09:03 +0800 Subject: [PATCH] Reorder local field declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Hans Hübner --- kong/plugins/http-log/handler.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kong/plugins/http-log/handler.lua b/kong/plugins/http-log/handler.lua index e9e0216d522b..fd2149f0ba90 100644 --- a/kong/plugins/http-log/handler.lua +++ b/kong/plugins/http-log/handler.lua @@ -202,12 +202,11 @@ function HttpLogHandler:log(conf) local response_get_header = kong.response.get_header for _, header_name in ipairs(conf.logged_headers_allow_list) do local request_header_val = request_get_header(header_name) - local response_header_val = response_get_header(header_name) - if request_header_val then set_serialize_value("request.headers." .. header_name, request_header_val) end + local response_header_val = response_get_header(header_name) if response_header_val then set_serialize_value("response.headers." .. header_name, response_header_val) end