How to modify a POST arg within Nginx?

Maxim Dounin mdounin at
Mon Apr 28 12:52:12 UTC 2014


On Mon, Apr 28, 2014 at 04:59:54AM +0000, Elvis Deng wrote:

> Hi all,
> I want to modify a POST value in Nginx and then put it back (don't change its original data flow).
> Does any existing module do the similar work? Thanks.

For simple use cases, the proxy_set_body directive can be used, 

Some 3rd party modules try to read request body themself and/or 
read it and then restart request processing with internal redirect 
or something like, but this is more or less a hack.

An API for a generic request body modifications isn't yet here, 
though there is an experminental patch previously published, 
see here:

Maxim Dounin

More information about the nginx-devel mailing list