shuaijinchao commented on issue #2392:
URL:
https://github.com/apache/apisix-dashboard/issues/2392#issuecomment-1077039954
Currently supports the use of `code` and `body`, which are the return
parameters of the plugin, you can understand by the following code.
```lua
local key_auth = plugin.get("key-auth")
local function func_rule_01816807_8c95_4e88_bc49_29b47286585e(ctx)
local phase_fun = key_auth.access or key_auth.rewrite
local plugins = ctx.script_plugins
-- here
local code, body = phase_fun(_M.conf_01816807_8c95_4e88_bc49_29b47286585e,
ctx)
core.table.insert(plugins, "key-auth")
core.table.insert(plugins, "conf_01816807_8c95_4e88_bc49_29b47286585e")
if code == 500 then -- here
return _M.func_rule_56e9ba95_9099_43df_9bef_051907a27c7c(ctx)
end
return _M.func_rule_53c9252d_d3d0_4378_a71a_1c108173ebe2(ctx)
end
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]