Skip to content

Commit

Permalink
Reorder local field declaration
Browse files Browse the repository at this point in the history
Co-authored-by: Hans Hübner <[email protected]>
  • Loading branch information
2 people authored and vm-001 committed Aug 29, 2023
1 parent 7addaa6 commit 8c2401c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kong/plugins/http-log/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8c2401c

Please sign in to comment.