Skip to content

Commit

Permalink
chore(kong): added health check path
Browse files Browse the repository at this point in the history
  • Loading branch information
EchoSkorJjj committed Apr 22, 2024
1 parent e4444fc commit 12e1347
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/kong-gateway/authn-kong/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local claim_spec = {
exp = validators.is_not_expired()
}


local health_check_path = "/api/v1/healthz"

-- Access phase handler
function MyAuthHandler:access(conf)
Expand All @@ -25,6 +25,11 @@ function MyAuthHandler:access(conf)

kong.log.notice("The path is ", path)

-- Exit if the path is the health check path
if path == health_check_path then
return kong.response.exit(200, { message = "OK" })
end

for i, pub_path in ipairs(publicPaths) do
if pub_path == path then
return
Expand Down

0 comments on commit 12e1347

Please sign in to comment.