Last active
April 14, 2024 14:03
-
-
Save mehuled/0f17e43df5b4b1c46961a5244791aed2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function plugin:access(plugin_conf) | |
_G.emmy = {} | |
_G.emmy.fixPath = function(path) | |
return string.gsub(path, '/usr/local/kong/plugins/', '/{path_to_working_directory}/') | |
end | |
package.cpath = package.cpath .. ';/usr/local/emmy/?.so' | |
local dbg = require('emmy_core') | |
dbg.tcpListen('localhost', 9966) | |
-- Wait for IDE connection | |
dbg.waitIDE() | |
-- your custom code here | |
kong.log.inspect(plugin_conf) -- check the logs for a pretty-printed config! | |
kong.service.request.set_header(plugin_conf.request_header, "this is on a request") | |
end --]] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment