diff --git a/src/common/confs/server-http/header-lua.conf b/src/common/confs/server-http/header-lua.conf index 239837889..ceb7f3f69 100644 --- a/src/common/confs/server-http/header-lua.conf +++ b/src/common/confs/server-http/header-lua.conf @@ -25,8 +25,8 @@ if not plugins then end plugins = cjson.decode(plugins) --- Call header() methods -logger:log(ngx.INFO, "calling header() methods of plugins ...") +-- Call head() methods +logger:log(ngx.INFO, "calling head() methods of plugins ...") for i, plugin in ipairs(plugins) do -- Require call local plugin_lua, err = helpers.require_plugin(plugin.id) @@ -35,27 +35,28 @@ for i, plugin in ipairs(plugins) do elseif plugin_lua == nil then logger:log(ngx.INFO, err) else - -- Check if plugin has header method - if plugin_lua.header ~= nil then + -- Check if plugin has head method + if plugin_lua.head ~= nil then -- New call local ok, plugin_obj = helpers.new_plugin(plugin_lua) if not ok then logger:log(ngx.ERR, plugin_obj) else + local ok, ret = helpers.call_plugin(plugin_obj, "head") if not ok then logger:log(ngx.ERR, ret) elseif not ret.ret then - logger:log(ngx.ERR, plugin.id .. ":header() call failed : " .. ret.msg) + logger:log(ngx.ERR, plugin.id .. ":head() call failed : " .. ret.msg) else - logger:log(ngx.NOTICE, plugin.id .. ":header() call successful : " .. ret.msg) + logger:log(ngx.NOTICE, plugin.id .. ":head() call successful : " .. ret.msg) end end else - logger:log(ngx.INFO, "skipped execution of " .. plugin.id .. " because method header() is not defined") + logger:log(ngx.INFO, "skipped execution of " .. plugin.id .. " because method head() is not defined") end end end -logger:log(ngx.INFO, "called header() methods of plugins") +logger:log(ngx.INFO, "called head() methods of plugins") return true diff --git a/src/common/core/errors/files/error.html b/src/common/core/errors/files/error.html index 003b5eadb..dd54811f5 100644 --- a/src/common/core/errors/files/error.html +++ b/src/common/core/errors/files/error.html @@ -5,6 +5,7 @@