AlinsRan commented on code in PR #12086: URL: https://github.com/apache/apisix/pull/12086#discussion_r2022196515
########## apisix/plugins/example-plugin.lua: ########## @@ -107,6 +116,49 @@ function _M.access(conf, ctx) return end + +function _M.before_proxy(conf, ctx) + core.log.warn("plugin before_proxy phase, conf: ", core.json.encode(conf)) + + if ctx.lua_proxy_upstream then + local status, body = lua_proxy_request(conf, ctx) + if status ~= 200 then + return status, body + end + core.log.warn("lua proxy upstream response: ", core.json.encode(body)) + plugin_lua_body_filter(conf, ctx, body) + end +end + + +function _M.lua_body_filter(conf, ctx, body) + core.log.warn("plugin lua_body_filter phase, conf: ", core.json.encode(conf)) + core.log.warn("plugin lua_body_filter phase, body: ", core.json.encode(body)) Review Comment: ditto -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org