Skip to content

Commit

Permalink
Logging: Added original request information on logging policy.
Browse files Browse the repository at this point in the history
This commit add the way to get the original request information on
logging policy to be able to log full request information.

Related to Issue #1082

Signed-off-by: Eloy Coto <[email protected]>
  • Loading branch information
eloycoto committed Sep 13, 2019
1 parent d818e1a commit 8329da5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gateway/src/apicast/executor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ local function shared_build_context(executor)
ctx.context = context
end

if not ctx.original_request then
store_original_request(ctx)
if not context.original_request then
store_original_request(context)
end

return context
Expand Down
1 change: 1 addition & 0 deletions gateway/src/apicast/policy/logging/logging.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ local function get_request_context(context)
}

ctx.service = context.service or {}
ctx.original_request = context.original_request
return LinkedList.readonly(ctx, ngx.var)
end

Expand Down

0 comments on commit 8329da5

Please sign in to comment.