Last active
June 28, 2018 01:17
-
-
Save thibaultcha/188d5e602298f21b38051d5ab3b4571a to your computer and use it in GitHub Desktop.
Kong 0.14.0 PDK example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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