Router module.
A set of functions to access the routing properties of the request.
Router module.
A set of functions to access the routing properties of the request.
Returns the current route
entity. The request is matched against this
route.
Phases
Returns
table
: The route
entity.Usage
local route = kong.router.get_route()
local protocols = route.protocols
Returns the current service
entity. The request is targeted to this
upstream service.
Phases
Returns
table
: The service
entity.Usage
if kong.router.get_service() then
-- routed by route & service entities
else
-- routed by a route without a service
end