Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to modify POST Request body

$
0
0
Hi guys, i have a NGINX as a reverse proxy but i need to modify the request body of POST data.

Let's say that if the POST contains:


Content-Disposition: form-data; name="cargaPapeles2:fileCarga"; filename="eicar.com"

I need to change that to:

Content-Disposition: form-data; name="cargaPapeles2:fileCarga"; filename="thisfilehasavirus"

Before sending the request to the backend server.

There is any way to do that ?

According to the NGINX documentation it can modify requests and responses in a reverse proxy scenario.


"Request and Response Rewriting:

Any part of a request or response, including headers, body and URI can be modified"

How can i modify a POST request body ?


Thanks.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>