Skip to content

Commit

Permalink
apicast: override proxy's cache_handler if received via context
Browse files Browse the repository at this point in the history
  • Loading branch information
davidor committed Jan 17, 2018
1 parent 1b77b2b commit c2c8f65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gateway/src/apicast/policy/apicast/policy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ function _M:rewrite(context)
-- because the module is reloaded and has to be configured again

local p = context.proxy

if context.cache_handler then
p.cache_handler = context.cache_handler
end

p.set_upstream(context.service)
ngx.ctx.proxy = p
end
Expand Down

0 comments on commit c2c8f65

Please sign in to comment.