bw - dont retrieve ctx when using api

This commit is contained in:
fl0ppy-d1sk 2024-01-03 12:07:30 +01:00
parent 2197f72be4
commit 355d671641
No known key found for this signature in database
GPG key ID: 93EE47CC3D061500
2 changed files with 3 additions and 3 deletions

View file

@ -164,12 +164,12 @@ helpers.call_plugin = function(plugin, method)
return true, ret
end
helpers.fill_ctx = function()
helpers.fill_ctx = function(no_ref)
-- Return errors as table
local errors = {}
-- Try to load saved ctx
local request = get_request()
if request then
if no_ref ~= true and request then
apply_ref()
end
local ctx = ngx.ctx

View file

@ -35,7 +35,7 @@ server {
-- Fill ctx
logger:log(INFO, "filling ngx.ctx ...")
local ok, ret, errors, ctx = fill_ctx()
local ok, ret, errors, ctx = fill_ctx(true)
if not ok then
logger:log(ERR, "fill_ctx() failed : " .. ret)
elseif errors then