Commit b2fb1546 authored by Thijs Schreijer's avatar Thijs Schreijer
Browse files

fix(handler) fix copy-paste errors

parent 376ddaa7
No related merge requests found
Showing with 13 additions and 13 deletions
+13 -13
......@@ -13,7 +13,7 @@ local plugin = require("kong.plugins.base_plugin"):extend()
-- constructor
function plugin:new()
plugin.super.new(self, plugin_name)
-- do initialization here, runs in the 'init_by_lua_block', before worker processes are forked
end
......@@ -32,29 +32,29 @@ end
--[[ handles more initialization, but AFTER the worker process has been forked/created.
-- It runs in the 'init_worker_by_lua_block'
function plugin:init_worker()
plugin.super.access(self)
plugin.super.init_worker(self)
-- your custom code here
end --]]
--[[ runs in the ssl_certificate_by_lua_block handler
function plugin:certificate(plugin_conf)
plugin.super.access(self)
plugin.super.certificate(self)
-- your custom code here
end --]]
--[[ runs in the 'rewrite_by_lua_block' (from version 0.10.2+)
-- IMPORTANT: during the `rewrite` phase neither the `api` nor the `consumer` will have
-- been identified, hence this handler will only be executed if the plugin is
-- been identified, hence this handler will only be executed if the plugin is
-- configured as a global plugin!
function plugin:rewrite(plugin_conf)
plugin.super.rewrite(self)
-- your custom code here
end --]]
---[[ runs in the 'access_by_lua_block'
......@@ -63,12 +63,12 @@ function plugin:access(plugin_conf)
-- your custom code here
ngx.req.set_header("Hello-World", "this is on a request")
end --]]
---[[ runs in the 'header_filter_by_lua_block'
function plugin:header_filter(plugin_conf)
plugin.super.access(self)
plugin.super.header_filter(self)
-- your custom code here, for example;
ngx.header["Bye-World"] = "this is on the response"
......@@ -77,18 +77,18 @@ end --]]
--[[ runs in the 'body_filter_by_lua_block'
function plugin:body_filter(plugin_conf)
plugin.super.access(self)
plugin.super.body_filter(self)
-- your custom code here
end --]]
--[[ runs in the 'log_by_lua_block'
function plugin:log(plugin_conf)
plugin.super.access(self)
plugin.super.log(self)
-- your custom code here
end --]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment