Skip to content

Instantly share code, notes, and snippets.

@serbaniuliuscezar
Created June 23, 2020 18:01
Show Gist options
  • Save serbaniuliuscezar/b362646d04a27f365526c0d1849d0423 to your computer and use it in GitHub Desktop.
Save serbaniuliuscezar/b362646d04a27f365526c0d1849d0423 to your computer and use it in GitHub Desktop.
local resp_body = string.sub(ngx.arg[1], 1, 1000)
ngx.ctx.buffered = (ngx.ctx.buffered or "") .. resp_body
if ngx.arg[2] then
ngx.var.resp_body = ngx.ctx.buffered
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment