large request body in njs

Jonathan Esterhazy jonathan.esterhazy at gmail.com
Mon Oct 29 20:44:17 UTC 2018


Hello!

I am trying to use njs (ngx_http_js_module) to modify POSTed request data
before sending to an upstream api. Using the req.requestBody function works
fine for small requests, but for larger ones causes this error:

[error] 14#14: *18 js exception: Error: request body is in a file

If I was using the Lua module, I could use ngx.req.get-body_file function
to get this data, but there doesn't seem to be any way to do that in njs.
Did I miss something? Is there a way to access the data or find out the
filename?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20181029/1d28446f/attachment.html>


More information about the nginx mailing list