diff --git a/src/bw/lua/bunkerweb/helpers.lua b/src/bw/lua/bunkerweb/helpers.lua index f7253c4a83..58fa74c69c 100644 --- a/src/bw/lua/bunkerweb/helpers.lua +++ b/src/bw/lua/bunkerweb/helpers.lua @@ -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 diff --git a/src/common/confs/api.conf b/src/common/confs/api.conf index d3a04af0b1..bd627dcf52 100644 --- a/src/common/confs/api.conf +++ b/src/common/confs/api.conf @@ -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