Skip to content

Instantly share code, notes, and snippets.

@thibaultcha thibaultcha/handler.lua
Last active Jun 28, 2018

Embed
What would you like to do?
Kong 0.14.0 PDK example
-- fictional example of a plugin's handler.lua using the PDK
function Handler:access(conf)
if kong.request.get_method() == "GET" then
-- retrieve the client request's path
local path = kong.request.get_path()
-- make the request to the service with the updated path
kong.service.request.set_path(path .. "/hello/world")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.