agile6v commented on issue #1225: URL: https://github.com/apache/incubator-apisix/issues/1225#issuecomment-636483692
Hi @Akayeshmantha We can refer to the implementation of the plugin [response-rewrite](https://github.com/apache/incubator-apisix/blob/master/apisix/plugins/response-rewrite.lua#L98). It has the ability to override the response body. In the echo plugin we implement the function like this: ```shell function _M.body_filter(conf, ctx) conf.before_body + response.body + conf.after_body end ``` FYI: https://github.com/openresty/lua-nginx-module#body_filter_by_lua Hope I've described it clearly. Thanks. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
