Skip to content

Commit

Permalink
fix(api) metadata represent infinity and non-numbers (#8833)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske authored May 20, 2022
1 parent fcb7275 commit bdde6ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion kong/api/routes/kong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit bdde6ae

Please sign in to comment.