Isso é possível usando as propriedades de resposta:
response = ngx.location.capture("/bar")
for headerName, header in pairs(response.header) do
ngx.header[headerName] = header
end
ngx.status = response.status
ngx.say(response.body)
ngx.exit(response.status)