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

Modify POST request and forward to Naxsi

$
0
0
Is it possible to create an nginx module which can receive a POST request, modify it, then forward it to the naxsi module?

The background to the question is the following:
There are clients performing measurements and communicating (on a slow GPRS connection) with a server (which resides behind a web application firewall) using POST requests. For some clients, there is a bug which sometimes make the client stop sending data before all data in the POST request has been sent. The server which handles the POST request can often tolerate that some data is missing. As an alternative to fix the bug in all clients in the field, we have an idea to let the clients connect to an intermediate server which receives POST requests, and if an acceptable small part of the data is missing (using a timeout), adjust the Content-Length of the request, and forward the request to the server. The server then processes the data and sends an OK message back, which the intermediate server then forwards to the client.

I have started to learn about nginx, and I think it should be possible to create a handler processing the POST request, and forward the (possibly adjusted) request to an upstream server through the naxsi module. Am I right?

Thanks in advance!

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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