Skip to content

Instantly share code, notes, and snippets.

@mehuled
Last active April 14, 2024 14:03
Show Gist options
  • Save mehuled/8deb7febb668b0f3def1067faa139882 to your computer and use it in GitHub Desktop.
Save mehuled/8deb7febb668b0f3def1067faa139882 to your computer and use it in GitHub Desktop.
function plugin:access(plugin_conf)
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