Skip to content

Commit

Permalink
added dns router
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Aug 7, 2024
1 parent 2dc24ea commit 0c1a3c0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions kong/api/routes/dns.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
local kong = kong


return {
["/status/dns"] = {
GET = function (self, db, helpers)

if kong.configuration.legacy_dns_client then
return kong.response.exit(501, {
message = "not implemented with the legacy DNS client"
})
end

return kong.response.exit(200, {
worker = {
id = ngx.worker.id() or -1,
count = ngx.worker.count(),
},
stats = kong.dns.stats(),
})
end
},
}

0 comments on commit 0c1a3c0

Please sign in to comment.