mirror of
https://gitee.com/iresty/apisix.git
synced 2024-12-02 12:07:35 +08:00
typo: fixed typo about function. (#2007)
This commit is contained in:
parent
ac69ad3e3a
commit
23bc76b5a0
@ -126,9 +126,9 @@ local function run_plugin(phase, plugins, api_ctx)
|
|||||||
and phase ~= "body_filter"
|
and phase ~= "body_filter"
|
||||||
then
|
then
|
||||||
for i = 1, #plugins, 2 do
|
for i = 1, #plugins, 2 do
|
||||||
local phase_fun = plugins[i][phase]
|
local phase_func = plugins[i][phase]
|
||||||
if phase_fun then
|
if phase_func then
|
||||||
local code, body = phase_fun(plugins[i + 1], api_ctx)
|
local code, body = phase_func(plugins[i + 1], api_ctx)
|
||||||
if code or body then
|
if code or body then
|
||||||
core.response.exit(code, body)
|
core.response.exit(code, body)
|
||||||
end
|
end
|
||||||
@ -138,9 +138,9 @@ local function run_plugin(phase, plugins, api_ctx)
|
|||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, #plugins, 2 do
|
for i = 1, #plugins, 2 do
|
||||||
local phase_fun = plugins[i][phase]
|
local phase_func = plugins[i][phase]
|
||||||
if phase_fun then
|
if phase_func then
|
||||||
phase_fun(plugins[i + 1], api_ctx)
|
phase_func(plugins[i + 1], api_ctx)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -47,9 +47,9 @@ function _M.run(phase, api_ctx)
|
|||||||
|
|
||||||
core.log.info("loaded script_obj: ", core.json.delay_encode(obj, true))
|
core.log.info("loaded script_obj: ", core.json.delay_encode(obj, true))
|
||||||
|
|
||||||
local phase_fun = obj[phase]
|
local phase_func = obj[phase]
|
||||||
if phase_fun then
|
if phase_func then
|
||||||
phase_fun(api_ctx)
|
phase_func(api_ctx)
|
||||||
end
|
end
|
||||||
|
|
||||||
return api_ctx
|
return api_ctx
|
||||||
|
@ -74,11 +74,11 @@ hello world
|
|||||||
[error]
|
[error]
|
||||||
--- error_log
|
--- error_log
|
||||||
string "route#1"
|
string "route#1"
|
||||||
phase_fun(): hit access phase
|
phase_func(): hit access phase
|
||||||
phase_fun(): hit header_filter phase
|
phase_func(): hit header_filter phase
|
||||||
phase_fun(): hit body_filter phase
|
phase_func(): hit body_filter phase
|
||||||
phase_fun(): hit body_filter phase
|
phase_func(): hit body_filter phase
|
||||||
phase_fun(): hit log phase while
|
phase_func(): hit log phase while
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user