moonming commented on a change in pull request #1381: feature: response-rewrite plugin rewrite binary data to client by base64 URL: https://github.com/apache/incubator-apisix/pull/1381#discussion_r401345697
########## File path: apisix/plugins/response-rewrite.lua ########## @@ -85,7 +90,13 @@ do function _M.body_filter(conf, ctx) if conf.body then - ngx.arg[1] = conf.body + + if conf.body_base64 then + ngx.arg[1] = ngx.decode_base64(conf.body) Review comment: if conf.body is not well formed, will return `nil`. we need add test case for it. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services