plugins: removed example-plugin from yaml configure. (#383)

This commit is contained in:
WenMing 2019-08-07 16:35:45 +08:00 committed by GitHub
parent 34c7b3843d
commit ffc71f529c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -3,7 +3,7 @@ local local_plugins = require("apisix.plugin").plugins_hash
local pairs = pairs
local pcall = pcall
local require = require
local table_remove = table.remove
local _M = {
version = 0.1,
@ -63,7 +63,12 @@ end
function _M.get_plugins_list()
return core.config.local_conf().plugins
local plugins = core.config.local_conf().plugins
if plugins[1] == 'example-plugin' then
table_remove(plugins, 1)
end
return plugins
end

View File

@ -14,6 +14,6 @@ __DATA__
--- request
GET /apisix/admin/plugins/list
--- response_body_like eval
qr/\["example-plugin","limit-req","limit-count","limit-conn","key-auth","prometheus","node-status","jwt-auth","zipkin"\]/
qr/\["limit-req","limit-count","limit-conn","key-auth","prometheus","node-status","jwt-auth","zipkin"\]/
--- no_error_log
[error]