How to save whole response data to nginx error.log?
snippet in lua
How to save whole response data to nginx error.log?
user7719
ngx.ctx.buffered = (ngx.ctx.buffered or "") .. ngx.arg[1]
if ngx.arg[2] then
ngx.var.resp_body = string.sub(ngx.ctx.buffered, 1, 5000)
end