Skip to content

Commit

Permalink
bw - dont retrieve ctx when using api
Browse files Browse the repository at this point in the history
  • Loading branch information
fl0ppy-d1sk committed Jan 3, 2024
1 parent 2197f72 commit 355d671
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/bw/lua/bunkerweb/helpers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/common/confs/api.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 355d671

Please sign in to comment.