Skip to content

Commit

Permalink
proxy: keep merged usage in ctx and self
Browse files Browse the repository at this point in the history
Otherwise, in some cases Proxy reports the usage associated with the
service mapping rules instead of the merged one.
  • Loading branch information
davidor committed Feb 7, 2018
1 parent 0c3aeb4 commit e38066c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gateway/src/apicast/proxy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ function _M:rewrite(service, context)
context.usage = context.usage or Usage.new()
context.usage:merge(usage)

ctx.usage = usage
ctx.usage = context.usage
ctx.credentials = credentials

self.credentials = credentials
self.usage = usage
self.usage = context.usage

var.cached_key = concat(cached_key, ':')

Expand Down

0 comments on commit e38066c

Please sign in to comment.