diff --git a/kong/api/routes/kong.lua b/kong/api/routes/kong.lua index 966c376329b2..11a5dce5ac51 100644 --- a/kong/api/routes/kong.lua +++ b/kong/api/routes/kong.lua @@ -93,9 +93,15 @@ return { local available_plugins = {} for name in pairs(singletons.configuration.loaded_plugins) do + local pr = kong.db.plugins.handlers[name].PRIORITY + if pr ~= nil then + if type(pr) ~= "number" or math.abs(pr) == math.huge then + pr = tostring(pr) + end + end available_plugins[name] = { version = kong.db.plugins.handlers[name].VERSION, - priority = kong.db.plugins.handlers[name].PRIORITY, + priority = pr, } end